Key scanning

ABSTRACT

A key scanning apparatus is provided. The key scanning apparatus comprises: a support arranged to support a key; a camera arranged to capture at least one image of the key supported by the support; at least one light source arranged to emit a beam of light towards the key supported by the support; and at least one processor configured to cause, based on data associated with the key, adjustment of at least one of: a position of the support, the camera, or a position of the light source. The support may be a platform. The light source may be a laser.

FIELD OF THE INVENTION

Embodiments of the present invention relate to key scanning.

BACKGROUND TO THE INVENTION

Keys come in a variety of shapes and sizes. It may be desirable toreplicate a particular (master) key. Replication involves determining anappropriate key blank to cut in order to replicate the key, determininghow to cut the key blank in order to replicate the key, and then cuttingthe selected key blank.

BRIEF DESCRIPTION OF VARIOUS EMBODIMENTS OF THE INVENTION

According to various, but not necessarily all, embodiments of theinvention there is provided a key scanning apparatus, comprising: aplatform arranged to receive a key; a motor arranged to adjust aposition of the platform; a camera arranged to capture at least oneimage of the key located on the platform; at least one light sourcearranged to emit a beam of light towards the key located on theplatform; and at least one processor configured to control the motor toadjust a position of the platform based on data associated with the key.

The data may comprise height data indicating a height of the key. The atleast one processor may be configured to retrieve the height data fromat least one memory and adjust the position of the platform based on theretrieved height data.

The at least one processor may be configured to adjust a position of theplatform in a first dimension. The first dimension may be a verticaldimension.

The key scanning apparatus may further comprise a further motor. The atleast one processor may be configured to control the further motor toadjust a position of the light source in a second dimension. The seconddimension may be a horizontal dimension.

The light source may be arranged to emit the beam of light in adirection that has a component in the first dimension and a component inthe second dimension.

At least a portion of the platform may be substantially transparent. Thedata associated with the key may comprise at least one image of the keycaptured by the camera.

The key scanning apparatus may further comprise an illumination sourcearranged to emit light towards the key located on the platform, in orderto enable the camera to capture at least one image of the key. Theillumination source may be a backlight for the platform. The backlightmay be arranged to emit light through the substantially transparentportion of the platform.

The at least one image captured by the camera may comprise at least oneimage depicting an outline of the key in two dimensions. The key mayhave a length, a width and a depth. The length may be greater than thewidth. The width may be greater than the depth. The two dimensions maybe the length and width dimensions. The at least one image captured bythe camera may be at least one silhouette of the key.

The key scanning apparatus may further comprise a reflector forreflecting light emitted by the illumination source towards the camera.

Following adjustment of the platform, the at least one processor may beconfigured to identify, based on at least in part on at least one imageof the key captured by the camera, a type of key blank for use inreplicating the key. Identification of the type of key blank may bebased at least in part on at least one image depicting an outline of thekey.

The at least one processor may be configured to determine, based on atleast in part on at least one image of the key captured by the camera,how to cut the identified key blank to replicate the key.

According to various, but not necessarily all, embodiments of theinvention there is provided a key scanning apparatus, comprising: asupport arranged to support a key; a camera arranged to capture at leastone image of the key supported by the support; at least one light sourcearranged to emit a beam of light towards the key supported by thesupport; and at least one processor configured to cause, based on dataassociated with the key, adjustment of at least one of: a position ofthe support, the camera, or the light source.

The support may be a platform for receiving the key. The light sourcemay be a laser.

The data may comprise height data indicating a height of the key. The atleast one processor may be configured to retrieve the height data fromat least one memory and to adjust the position of the platform based onthe retrieved height data.

Causing adjustment of the position of the support may comprise causingadjustment of a position of the support in a vertical dimension. Causingadjustment of the camera may comprise causing adjustment of at least oneof a position of the camera or an optical arrangement of the camera.Causing adjustment of a position of the light source may comprisecausing adjustment of a position of the light source in a horizontaldimension.

According to various, but not necessarily all, embodiments of theinvention there is provided a key scanning apparatus, comprising: aplatform for receiving a key; means for adjusting a position of theplatform; means for capturing at least one image of the key located onthe platform; means for emitting a beam of light towards the key locatedon the platform; and means for causing adjustment of a position of theplatform based on data associated with the key.

According to various, but not necessarily all, embodiments of theinvention there is provided a key scanning apparatus, comprising: atleast one light source arranged to direct a beam of light towards ablade of a key; a camera arranged to capture at least a portion of thebeam of light reflected by the blade of the key; memory storing at leastone computer program comprising computer program instructions; and atleast one processor that, when executing the computer programinstructions, is configured to: determine, at least in part from storedkey replication data, a plurality of decoding positions at which theblade of the key is to be scanned in order to decode the key; adjust aposition of the light source in order to cause the light source todirect the beam of light towards the blade of the key at each of theplurality of decoding positions; obtain at least one image, from thecamera, of at least a portion of the beam of light reflected from theblade of the key at each of the plurality of decoding positions;determine one or more properties of a shape of the blade of the key ateach of the plurality of decoding positions by analysing the images, inorder to decode the key.

The blade of the key may have a length in a length dimension, a width ina width dimension and a depth in a depth dimension. The length may begreater than the width. The width may be greater than the depth. Each ofthe plurality of positions may be a position along the length dimensionof the blade of the key.

The at least one image may depict a shape of the blade of the key in aplane defined by the width dimension and the depth dimension. The one ormore properties may include a position, in the width dimension, of a cutinto the blade of the key. The position, in the width dimension, of thecut into the blade of the key is specified from an edge of the blade ofthe key.

The one or more properties may include a depth of cut into the blade ofthe key in the depth dimension. The one or more properties may include awidth of cut into the blade of the key in the width dimension.

The at least one processor, when executing the computer programinstructions, may be configured to: capture at least one image depictingan outline of at least the blade of the key in the length and widthdimensions; and determine, from the at least one image, a location of atip of the blade of the key, wherein the plurality of decoding positionsat which the blade of the key is to be scanned in order to replicate thekey is determined, at least in part, from the determined location of thetip of the blade of the key.

The beam of light may be shaped to define a line across the blade of thekey.

The at least one processor, when executing the computer programinstructions, may be configured to: for each decoding position, adjust aposition of the light source to direct the beam of light towards theblade of the key at one or more positions that are offset from thedecoding position, and obtain at least one image, from the camera, ofthe blade of the key at the one or more offset positions based on atleast a portion of the beam of light reflected by the blade of the key;and for each decoding position, determine a property of a shape of theblade of the key by analysing the images of the beam of light at thedecoding position and the one or more offset positions, in order todecode the key.

The one or more positions that are offset from the decoding position maybe offset from the decoding position in the length dimension.

According to various, but not necessarily all, embodiments of theinvention there is provided a method, comprising: determining, at leastin part from stored key replication data, a plurality of decodingpositions at which the blade of a key is to be scanned in order todecode the key; adjusting a position of at least one light source inorder to cause the light source to direct a beam of light towards theblade of the key at each of the plurality of decoding positions; obtainat least one image, from a camera, of at least a portion of the beam oflight reflected from the blade of the key at each of the plurality ofdecoding positions; determine one or more properties of a shape of theblade of the key at each of the plurality of decoding positions byanalysing the images, in order to decode the key.

According to various, but not necessarily all, embodiments of theinvention there is provided at least one computer program comprisingcomputer program instructions that, when executed by at least oneprocessor, cause the method described above to be performed. At leastone non-transitory computer readable medium storing the at least onecomputer program instructions may be provided.

According to various, but not necessarily all, embodiments of theinvention there is provided an apparatus, comprising: memory storing atleast one computer program comprising computer program instructions; andat least one processor that, when executing the computer programinstructions, is configured to: cause a camera to capture at least oneimage depicting an outline of a key having a length in a lengthdimension and a width in a width dimension, the key comprising a headand a blade; identify the blade in the at least one image; process theat least one image to simulate reconstruction of at least one edge ofthe blade of the key along the length dimension and thereby form areconstructed key; determine a travel distance, for the reconstructedkey in the length dimension, into each of a plurality of two-dimensionalareas by comparing a width of the reconstructed key with a width of atwo-dimensional area at multiple positions along a length of thereconstructed key from a tip of the reconstructed blade, wherein thetravel distance corresponds with a distance from the tip of thereconstructed blade to a position along the length dimension at whichthe width of the reconstructed key becomes greater than the width of thetwo-dimensional area, and wherein each two-dimensional area correspondswith a blade of a key blank;

determine, for each two-dimensional area, a width of the reconstructedkey at a position along the length dimension that corresponds, at leastapproximately, with the travel distance; determine, for eachtwo-dimensional area, whether the travel distance of the reconstructedkey in the length dimension matches, at least approximately, the lengthof the two-dimensional area and determine, for each two-dimensionalarea, whether the determined width of the reconstructed key, at aposition along the length of the reconstructed key based on the traveldistance, at least approximately matches the width of thetwo-dimensional area; and identify one or more key blanks associatedwith one or more of the two-dimensional areas that have a length thatmatches, at least approximately, the travel distance and a width thatmatches, at least approximately, the width of the reconstructed key at aposition along the length dimension that corresponds, at leastapproximately, with the travel distance.

The at least one processor may be configured, when executing thecomputer program instructions, to: control at least one light source todirect a beam of light to a position on the blade in the lengthdimension that corresponds, at least approximately, with the traveldistance.

The at least one processor may be configured, when executing thecomputer program instructions, to: cause a camera to capture at leastone image of a reflection, from the blade of the key, of at least aportion of the beam of light.

The at least one processor may be configured, when executing thecomputer program instructions, to: compare the at least one image of thereflection with a two-dimensional profile of each of the one or moreidentified key blanks.

The at least one processor may be configured, when executing thecomputer program instructions, to: control the light source to move intoa plurality of different positions in order to direct the beam of lightto a plurality of different positions on the blade in the lengthdimension, each of which corresponds, at least approximately, with thetravel distance; and cause the camera to capture at least one image of areflection, from the blade of the key, of at least a portion of the beamof light in respect of each of the plurality of different positions ofthe light source.

The plurality of images may be combined using image averaging to form acombined image. The combined image may be compared with atwo-dimensional profile of each of the one or more identified keyblanks.

According to various, but not necessarily all, embodiments of theinvention there is provided a method, comprising: causing a camera tocapture at least one image depicting an outline of a key having a lengthin a length dimension and a width in a width dimension, the keycomprising a head and a blade; identify the blade in the at least oneimage; process the at least one image to simulate reconstruction of atleast one edge of the blade of the key along the length dimension andthereby form a reconstructed key; determining a travel distance, for thereconstructed key in the length dimension, into each of a plurality oftwo-dimensional areas by comparing a width of the reconstructed key witha width of a two-dimensional area at multiple positions along a lengthof the reconstructed key from a tip of the reconstructed blade, whereinthe travel distance corresponds with a distance from the tip of thereconstructed blade to a position along the length dimension at whichthe width of the reconstructed key becomes greater than the width of thetwo-dimensional area, and wherein each two-dimensional area correspondswith a blade of a key blank; determining, for each two-dimensional area,a width of the reconstructed key at a position along the lengthdimension that corresponds, at least approximately, with the traveldistance; determining, for each two-dimensional area, whether the traveldistance of the reconstructed key in the length dimension matches, atleast approximately, the length of the two-dimensional area anddetermine, for each two-dimensional area, whether the determined widthof the reconstructed key, at a position along the length of thereconstructed key based on the travel distance, at least approximatelymatches the width of the two-dimensional area; and identifying one ormore key blanks associated with one or more of the two-dimensional areasthat have a length that matches, at least approximately, the traveldistance and a width that matches, at least approximately, the width ofthe reconstructed key at a position along the length dimension thatcorresponds, at least approximately, with the travel distance.

According to various, but not necessarily all, embodiments of theinvention there is provided at least one computer program comprisingcomputer program instructions that, when executed by at least oneprocessor, cause the method described above to be performed. The atleast one computer program may be stored on at least one non-transitorycomputer readable medium.

According to various, but not necessarily all, embodiments of theinvention there is provided an apparatus, comprising: memory storing atleast one computer program comprising computer program instructions; andat least one processor that, when executing the computer programinstructions, is configured to: cause at least one image of a key to becaptured, the image depicting a blade of the key that includes cuts inan edge of the blade, wherein the blade in the at least one image has alength in a length dimension and a width in a width dimension;determine, at least in part from stored key replication data, aplurality of decoding positions for the cuts in the blade; determine aplurality of examining positions, for each decoding position, at whichto examine each of the cuts in the edge of the blade depicted in theimage, wherein each examining position in a plurality of examiningpositions for a decoding position has a corresponding examining positionin each of the other plurality of examining positions for the otherdecoding positions, each corresponding examining position being the samedistance from its decoding position, wherein corresponding examiningpositions form a set of examining positions; for each set of examiningpositions, examine the cuts in the edge of the blade by determining, foreach corresponding examining position in a set of examining positions,how long the edge of the blade remains substantially parallel to thelength dimension; determine at least one value to store, for each set ofexamining positions, corresponding with how long the edge of the bladeremains substantially parallel to the length dimension; determine, fromthe stored values, an optimum set of examining positions at which todetermine, from the at least one image, a size of each cut in the bladeof the key; and decode the key at least in part by determining a size ofa cut in the blade of the key at each of the examining positions in theoptimum set of examining positions.

The at least one processor, when executing the computer programinstructions, may be configured to: determine, from the stored keyreplication data, valid sizes of cut; and compare a size of cut at eachexamining position in the optimum set of examining positions with thevalid sizes of cuts.

The at least one processor, when executing the computer programinstructions, may be configured to: decide whether to cut a replicationof the key by code or by trace based, at least in part on thecomparisons.

The at least one processor, when executing the computer programinstructions, may be configured to: determine a trace by which to cutthe key from the at least one image captured of the key.

Comparing a size of a size of cut at each examining position in theoptimum set of examining positions with valid sizes of cuts may comprisedetermining a difference between a size of cut at an examining positionin the optimum set of examining positions and a valid size of cut.

The at least one processor, when executing the computer programinstructions, may be configured to: determine that a cut in the edge ofthe blade at an examining position in the set of optimum examiningpositions does not correspond with a valid size of cut, if thedifference between the cut in the edge of the blade at the examiningposition in the set of optimum examining positions and the valid size ofthe cut does not fall within a particular range.

The at least one processor, when executing the computer programinstructions, may be configured to: decide to cut a replication of thekey by trace if the cut in the edge of the blade at the examiningposition in the set of optimum examining positions does not correspondwith any of the expected sizes of the cuts at the decoding position.

According to various, but not necessarily all, embodiments of theinvention there is provided a method, comprising: causing at least oneimage of a key to be captured, the image depicting a blade of the keythat includes cuts in an edge of the blade, wherein the blade in the atleast one image has a length in a length dimension and a width in awidth dimension; determining, at least in part from stored keyreplication data, a plurality of decoding positions for the cuts in theblade; determining a plurality of examining positions, for each decodingposition, at which to examine each of the cuts in the edge of the bladedepicted in the image, wherein each examining position in a plurality ofexamining positions for a decoding position has a correspondingexamining position in each of the other plurality of examining positionsfor the other decoding positions, each corresponding examining positionbeing the same distance from its decoding position, whereincorresponding examining positions form a set of examining positions; foreach set of examining positions, examining the cuts in the edge of theblade by determining, for each corresponding examining position in a setof examining positions, how long the edge of the blade remainssubstantially parallel to the length dimension; determining at least onevalue to store, for each set of examining positions, corresponding withhow long the edge of the blade remains substantially parallel to thelength dimension; determining, from the stored values, an optimum set ofexamining positions at which to determine, from the at least one image,a size of each cut in the blade of the key; and decoding the key atleast in part by determining a size of a cut in the blade of the key ateach of the examining positions in the optimum set of examiningpositions.

According to various, but not necessarily all, embodiments of theinvention there is provided at least one computer program comprisingcomputer program instructions that, when executed by at least oneprocessor, cause the method described above to be performed. The atleast one computer program may be stored on at least one non-transitorycomputer readable medium.

BRIEF DESCRIPTION OF THE DRAWINGS

For a better understanding of various examples of embodiments of thepresent invention reference will now be made by way of example only tothe accompanying drawings in which:

FIG. 1A illustrates a perspective view of a key scanning apparatus;

FIG. 1B illustrates a front elevation of the key scanning apparatus;

FIG. 1C illustrates a plan view of the key scanning apparatus;

FIG. 1D illustrates a side elevation of the key scanning apparatus;

FIG. 2 illustrates a schematic of some functional elements of the keyscanning apparatus;

FIG. 3 illustrates a perspective view of a body of a housing of the keyscanning apparatus;

FIG. 4A illustrates an exploded front perspective view of a firstembodiment of imaging apparatus of the key scanning apparatus;

FIG. 4B illustrates a rear perspective view of some aspects of the firstembodiment of the imaging apparatus of the key scanning apparatus;

FIG. 5 illustrates a perspective view of an underside of the movableplatform in the first embodiment;

FIG. 6 illustrates a perspective view of the movable platform in asecond embodiment;

FIG. 7A illustrates a front perspective view of the imaging apparatus ofthe key scanning apparatus in the second embodiment;

FIG. 7B illustrates a rear perspective view of the imaging apparatus ofthe key scanning apparatus in the second embodiment;

FIG. 8A illustrates an elevation of a single-edged cylinder key blank;

FIG. 8B illustrates an elevation of a double-edged cylinder key blank;

FIG. 8C illustrates an elevation of a lever key blank;

FIG. 8D illustrates an elevation of a dimple key blank;

FIG. 8E illustrates an elevation of a high security key blank;

FIG. 9A illustrates a cross section of the single-edged cylinder keyblank illustrated in FIG. 8A through the line A-A in FIG. 8A;

FIG. 9B illustrates a cross section of the double-edged cylinder keyblank illustrated in FIG. 8A through the line B-B in FIG. 8B;

FIG. 9C illustrates a cross section of the lever key blank illustratedin FIG. 8C through the line C-C illustrated in FIG. 8C;

FIG. 9D illustrates a cross section of the dimple key blank or the highsecurity key blank through the line D-D or E-E illustrated in FIG. 8D orFIG. 8E;

FIG. 9E illustrates another example of a cross section of a key blank;

FIG. 9F illustrates a further cross section of a key blank;

FIG. 10A illustrates a first key placed on a platform of the keyscanning apparatus;

FIG. 10B illustrates a second key placed on the platform of the keyscanning apparatus;

FIG. 11 illustrates a schematic of a first method;

FIG. 12 illustrates a schematic of a second method;

FIG. 13 illustrates a schematic of a third method;

FIG. 14A illustrates a plan view of a single-edged cylinder key;

FIG. 14B illustrates a view of the single-edged cylinder key as seenwhen looking towards the tip of the key;

FIG. 15 illustrates a schematic of a simulated reconstruction of theblade of the cylinder key;

FIG. 16A illustrates a cross-section of the single-edged cylinder keyillustrated in FIGS. 14A and 14B;

FIG. 16B illustrates an image of an upper surface of the single-edgedcylinder key that is captured by reflecting a laser beam from the uppersurface;

FIG. 17A illustrates an example of a dimple key cut from the dimple keyblank illustrated in FIGS. 8D and 9D;

FIG. 17B illustrates an example of a high security key cut from the highsecurity blank illustrated in FIGS. 8E and 9D;

FIG. 18 illustrates a schematic of a third method;

FIG. 19A illustrates a cross section of the high security keyillustrated in FIG. 17B through the line B-B;

FIG. 19B illustrates a laser line reflection of a portion of the uppersurface of the high security key illustrated in FIG. 19A;

FIG. 20 illustrates a schematic of a fourth method;

FIG. 21 illustrates a plurality of decoding positions A-F in respect ofthe single-edged cylinder key illustrated in FIG. 14A;

FIG. 22A illustrates a plurality of examining positions for a decodingposition;

FIGS. 22B and 22C illustrates a determination of an angle beingperformed between positions spaced along a length dimension of a cut;and

FIG. 23 illustrates a schematic of a fifth method.

DETAILED DESCRIPTION OF VARIOUS EMBODIMENTS OF THE INVENTION

FIGS. 1A, 1B, 10 and 1D illustrate a perspective, front, plan and sideviews of a key scanning apparatus 100 respectively. The key scanningapparatus 100 is shaped and sized to be hand portable. That is, the keyscanning apparatus 100 can be picked up by a person using her hands andmoved. It may, for example, be suitable for positioning on a desk ortabletop.

The key scanning apparatus 100 comprises a housing 120. In theillustrated example, the housing 120 includes a hinged door 22 that maybe opened to reveal a support for supporting a key to be scanned (notshown in FIGS. 1A to 1D). The support may be a platform. The hinged door22 includes a handle 23. In other examples, the hinged door 22 might notbe present.

FIGS. 1A to 1D further show that the key scanning apparatus 100 maycomprise an electronic display 30. In the illustrated example, thedisplay 30 is rotatable about a hinge, but that might not be the case inother examples.

FIG. 2 illustrates a schematic of some functional elements of the keyscanning apparatus 100. In addition to the display 30, the key scanningapparatus 100 may include at least one processor 112, memory 114, userinput circuitry 32, a camera 34, an illumination source 36, a lightsource 38, a first motor 40 and/or a second motor 42.

The illustrated elements 112, 14, 30, 32, 34, 36, 38, 40 and 42 areoperationally coupled. Any number of intervening elements can existbetween them (including no intervening elements).

The display 30 is an electronic display which may comprise an array ofpixels formed in rows and columns. The display 30 can be any type ofelectronic display, including a liquid crystal display (LCD) and anorganic light emitting diode (OLED) display. The processor 112 isconfigured to provide outputs to the display 30 to control content thatis displayed by the display 30.

The user input circuitry 32 is configured to receive inputs from a userof the key scanning apparatus 100. The user may be a person that wishesto have an existing (master) key scanned for future replication of thatexisting key. The user input circuitry 32 might, for example, compriseone or more keys and/or one or more buttons. In some embodiments, someor all of the user input circuitry 32 might be integrated with thedisplay 30 in a touch sensitive display.

The camera 34 is a digital camera that includes an image sensor, such asa charge coupled device (CCD) or a complementary metal oxidesemiconductor (CMOS) sensor. The camera 34 is under the control of theprocessor 112 and is configured to provide images to the processor 112.Each image may be in the form of two-dimensional images formed of anarray of pixels arranged in columns and rows. The camera 34 is arrangedto capture at least one image of a key supported by a support that isaccessible via the hinged door 22.

The illumination source 36 is controlled by the processor 112. Theillumination source 36 is configured to provide illumination thatenables the camera 34 to capture at least one image of a key supportedby the support. The image(s) might depict an outline of the key in twodimensions (e.g. length and width dimensions defined by the x and y axesrespectively in the figures). The illumination provided by theillumination source 36 may include incoherent light. The illuminationmight be substantially white in colour. Where the support is a platformthat has at least a portion that is substantially transparent, theillumination source 36 may be a backlight for the platform. This isdescribed in further detail below.

The light source 38 is controlled by the processor 112. The light source38 is different from the illumination source 36. It is arranged to emita beam of light towards the key supported by the support. The beam oflight may comprise or consist of coherent light. In this regard, thelight source 38 might be a laser. The beam of light provided by thelight source 38 may enable the camera 34 to capture at least one imageof a key supported by the support. For instance, the beam of light mightbe reflected, at least in part, towards the camera 34 by the key. Theimage(s) might depict a two-dimensional profile of the key (e.g. inwidth and depth dimensions defined by the y and z axes respectively inthe figures).

The first and second motors 40, 42 are controlled by the processor 112.The processor 112 may control the first motor 40 to adjust a position ofthe support/platform supporting a key based on data associated with thekey. The second motor 42 is arranged to adjust a position of the lightsource 38. This is described in further detail below.

The processor 112 and the memory 114 may be considered collectively tobe control circuitry 11. The processor 112 is configured to read fromand write to the memory 114. The processor 112 may also comprise anoutput interface via which data and/or commands are output by theprocessor 112 and an input interface via which data and/or commands areinput to the processor 112.

The memory is a non-transitory computer-readable storage medium. Thememory 114 stores a computer program 116 comprising computer programinstructions (computer program code) that controls the operation of thekey scanning apparatus 100 when loaded into the processor 112. Thecomputer program instructions, of the computer program 116, provide thelogic and routines that enables the key scanning apparatus 100 toperform the methods illustrated in FIGS. 11, 12, 13, 18, 20 and 23 . Theprocessor 112, by reading the memory 114, is able to load and executethe computer program 116.

The memory 114 may store data 118. The data 118 may include, forexample, key height data 181, key blank outline data 182, key blankblade data 183 and/or key replication data 184. This is described infurther detail below.

The height data 181 may indicate a height of a key. The processor 112may, for example, be configured to retrieve the height data 181 from thememory 114 and adjust the position of the support/platform based on theretrieved height data. This is described in further detail below.

Although the memory 114 is illustrated as a single component/circuitryit may be implemented as one or more separate components/circuitry someor all of which may be integrated/removable and/or may providepermanent/semi-permanent/dynamic/cached storage.

Although the processor 112 is illustrated as a singlecomponent/circuitry it may be implemented as one or more separatecomponents/circuitry some or all of which may be integrated/removable.The processor 112 may be a single core or multi-core processor.

The processor 112, the memory 114, the display 30, the user inputcircuitry 32, the camera 34, the illumination source 36, the lightsource 38, the first motor 40 and the second motor 42 may be housed bythe housing 120 illustrated in FIGS. 1A to 1D. In the exampleillustrated in FIGS. 1A to 1D the display 30 and the user inputcircuitry 32 are integrated as a touch sensitive display. At least partof the display 30 and the user input circuitry 32 are located on anexterior of the housing 120. The processor 112, the memory 114, thecamera 34, the illumination source 36, the light source 38, the firstmotor 40 and the second motor 42 are located inside the housing 120 inthe example illustrated in FIGS. 1A to 1D.

FIG. 3 illustrates a body 24 of the housing 120. The body 25 includes anaperture 25 that can be revealed by opening the hinged door 22. In use,a person opens the hinged door 22 to place a key onto thesupport/platform in order to enable it to be scanned (and subsequentlyreplicated).

FIG. 4A illustrates an exploded front perspective view of imagingapparatus 101 of the key scanning apparatus 100. FIG. 4B illustrates arear perspective view of some aspects of the imaging apparatus 101 ofthe key scanning apparatus 100 that are illustrated in FIG. 4A.

Cartesian co-ordinate axes 70 having x, y and z axes are illustrated inFIGS. 4A and 4B. Each of the x, y and z axes defines a dimension. The zaxis may be considered to be a vertical dimension. The x and y axes maybe considered to be horizontal dimensions.

In the illustrated example, the light source 38 is a laser that issupported by a movable support 45. The movable support 45 is arranged tomove along a track 44 that is located on a platform 41. The track 44extends in a dimension defined by the x-axis in the figures. The movablesupport 45 is coupled to the second motor 42 by a shaft 43. The secondmotor 42 is also supported by the platform 41. The second motor 42 isconfigured to move the shaft 43 in order to cause the support 45, andtherefore the laser 38, to move along the track 44. The processor 112may therefore control the second motor 42 to adjust the position of thelaser 38 in the dimension defined by the x-axis in FIGS. 4A and 4B.

The dotted line marked with the reference numeral 39 in FIGS. 4A and 4Bindicates the direction in which the laser 38 is configured to emit abeam of light. It can be seen in FIGS. 4A and 4B that the direction hasa component a dimension defined by the z-axis (the vertical dimension)and a component defined by the x-axis (a horizontal dimension).

A support/platform 50 for receiving and supporting a key to be scannedis illustrated in FIG. 4A. In this example, a key to be scanned may beplaced onto the platform 50 by a user—for instance, by opening thehinged door 22 and passing the key through the aperture 25 in the body24 of the housing 120.

At least a portion of the platform 50 is substantially transparent. Inthe illustrated example, a majority of the platform 50 is substantiallytransparent. In use, a user places a key to be scanned on thesubstantially transparent portion. A visual indicator 170 may be presenton or near the platform 50 to indicate to the user how to position thekey on the platform 50 for optimum results. In this example, the visualindicator 170 is an arrow located on the support 45. The visualindicator 170 indicates where the user should position the tip of theblade of the key to be scanned.

The illumination source 36 is configured to emit light towards a keylocated on the platform 50, in order to enable the camera 34 to captureat least one image of the key. As explained above, the illuminationsource 36 may be a backlight for the platform 50 that is arranged toemit light through the substantially transparent portion of the platform50. In the example illustrated in FIG. 4A, the illumination source 36 isarranged to emit light in a +z direction, as shown by the dotted linemarked with the reference numeral 49. The light passes through theplatform 50 and through the aperture 149. Optionally, the light may alsobe reflected by at least one reflector 60, as shown in FIG. 4A, beforereaching the camera 34. The reflector 60 may be a mirror.

After being reflected, the light travels in a −x direction, as shown bythe dotted line marked with the reference numeral 59 in FIG. 4A.Advantageously, the presence of the reflector 60 enables the height ofthe key scanning apparatus 100 to be reduced relative to an embodimentin which it were not present. This makes the key scanning apparatus 100more suitable for desktop/tabletop use.

At least one image of a key located on the platform 50 may be capturedby the camera 34 using the light emitted by the illumination source 36of the light source 38. The image captured by the camera 34 depicts atleast a portion of an outline of the key in two dimensions. Consider akey with a length, a width and a depth, where the length is aligned withthe x-axis (the length dimension), the width is aligned with the y-axis(the width dimension) and the depth is aligned with the z-axis (thedepth dimension) in FIG. 4A. The length dimension of the key is greaterthan the width dimension, and the width dimension is greater than thedepth dimension. When illumination is provided by the illuminationsource 36, the image captured by the camera 34 may depict the (whole)outline of the key in the length and width dimensions. The image may bea silhouette of the key which is formed because the key is situated inan optical path between the camera 34 and the illumination source 36 andbecause the key is impermeable to light.

The platform 41 comprises an aperture 149. A beam of light emitted bythe light source 38 may pass through the aperture 149, towards theplatform 50. In the absence of a key on the platform 50, the beam oflight from the laser 38 passes through the substantially transparentportion of the platform 50. If a key is present on the platform 50 andthe beam of light is appropriately directed towards a blade of the key,the beam of light is at least partially reflected by the blade of thekey towards the reflector 60 (such that the reflected light travels inin a +z direction, as shown by the dotted line marked with the referencenumeral 49). The light is then reflected by the reflector 60 towards thecamera 34, travelling in a −x direction, as shown by the dotted linemarked with the reference numeral 59 in FIG. 4A.

When a beam of light is emitted by the light source 38, the imagecaptured by the camera 34 may depict a portion of the outline of the keyin the width and depth dimensions (defined by the y and z axes in thefigures), where the portion corresponds the portion of the upper surfaceof the key on the platform 50 that is exposed to the beam of lightemitted by the light source 38. The beam of light might be shaped todefine a line that extends across the key in the width dimension.

The first motor 40 is configured to move the platform 50 in thedimension defined by the z-axis in FIG. 4A (the vertical dimension). Theprocessor 112 may therefore control the first motor 40 to adjust aposition of the platform 50 in the vertical dimension. In particular, aposition of the platform 50 can be adjusted (downwards) from a firstposition to a second position, in which the second position is furtherfrom the light source 38 than the first position.

FIG. 5 illustrates a perspective view of an underside of the movableplatform 50. A shaft of the first motor 40 is coupled to a rotating cam140 (via a rotating part 142 in this example). A cam follower 144 iscoupled to the platform 50 at the underside of the platform 146. The camfollower 144 supports the platform 50. The cam follower 144 comprises aslot 146 through which the cam extends. It can be seen in FIG. 5 that adistal end of the cam 140 is shaped such that it cannot pass through theslot 146, so as to maintain a coupling between the cam 140 and the camfollower 144. When the first motor 40 is in operation, rotary motion ofthe shaft of the motor is converted into translation motion of the camfollower 144 by the coupling of the cam 140 and the cam follower 146.The cam follower 44 is arranged to move along at least one rail 148mounted to a supporting surface 150. Translational motion of the camfollower 144 causes translational motion of the platform 50.

FIG. 6 illustrates a perspective view of the moveable platform 50 in analternative embodiment of the imaging apparatus 101 from thatillustrated in FIGS. 4A to 5 . Movement of the platform 50 is performedin substantially the same manner as that described above in relation toFIG. 5 . However, in this embodiment the first motor 40, the rotatingcam 140, the rotating part 142 and the cam follower 144 are positioneddifferently from the embodiment illustrated in FIGS. 4A to 5 . The firstmotor 40, the rotating cam 140, the rotating part 142 and the camfollower 144 are positioned higher in the dimension defined by thez-axis. As shown in FIG. 6 , in this embodiment the cam follower 144 iscoupled to the platform 50 at a side of the platform, rather than theunderside as in the previous embodiment.

FIG. 7A illustrates a front perspective view of the imaging apparatus101 of the key scanning apparatus 100 in the second embodiment. FIG. 7Billustrates a rear perspective view of the imaging apparatus 101 of thekey scanning apparatus 100 in the second embodiment. It can be seen inFIGS. 7A and 7B that both the first motor 40 and the second motor 42 aresupported by the platform 41 on which the track 44 is positioned in thesecond embodiment. The functionality of the second embodiment is asdescribed above in relation to FIGS. 4A and 4B.

The key scanning apparatus 100 is for scanning many different types ofkey. In some implementations, it may be for scanning any type of key. Inorder to scan a (master) key so that it can be replicated, the type ofkey must be identified. This is so that an appropriate key blank can beidentified for cutting. The manner in which the key has been cut fromthe blank must also be determined in order to replicate the key.

Many different types of key (and therefore many different types of keyblank) exist. Some examples of key blanks are illustrated in FIGS. 8A to8E. FIG. 8A illustrates a single-edged cylinder key blank 210 comprisinga head 212 and a blade 214. An edge 216 of the blade 214 is cut toreplicate a key. In the illustrated example, the head 212 of thecylinder key blank 210 is substantially flat, but the blade 214 is not.The depth of the head 212 (i.e. in the dimension extending into thepage) is substantially the same as the depth of the blade 214. FIG. 9Aillustrates a cross section of the single-edged cylinder key blank 210through the line A-A illustrated in FIG. 8A.

FIG. 8B illustrates a double-edged cylinder key blank 220 comprising ahead 222 and a blade 224. First and second edges 226 a, 226 b of theblade 224 are cut to replicate a key. In the illustrated example, thehead 222 of the cylinder key blank 220 is substantially flat, but theblade 224 is not. The depth of the head 222 (i.e. in the dimensionextending into the page) is substantially the same as the depth of theblade 224. FIG. 9B illustrates a cross section of the double-edgedcylinder key blank 20 through the line B-B illustrated in FIG. 8B.

FIG. 8C illustrates an example of a lever key blank 230. The lever keyblank 230 has a head 232 and a shaft 234. The depth of the head 232 issmaller than the depth of the shaft 234. A blade 236 to be cut islocated at the opposite end of the shaft 234 to the head 232. The head232 of the lever key blank 230 in this example is substantially flat andthe shaft 234 is substantially cylindrical. FIG. 9C illustrates across-section of the shaft 234 through the line C-C illustrated in FIG.8C.

FIG. 8D illustrates an example of a dimple key blank 240. The dimple keyblank 240 has a head 242 and a blade 244. The head 242 may be made froma plastics material and may have a much greater depth than the blade244. The blade 244 of the dimple key blank 240 is a rectangular prismshape. FIG. 9D illustrates the cross section of the blade 244 throughthe line D-D illustrated in FIG. 8D. The dimple key blank 240 is cut bycutting cone-shaped dimples into the upper surface 246 of the blade 244and/or the lower surface of the blade 244 (that is, the surfaces definedby the length and width of the blade 244).

FIG. 9E illustrates a high security key blank 250, such as an automotiveor residential key blank. The high security key blank 250 comprises ahead 252 and a blade 254. The head 252 may be made from a plasticsmaterial and may have a much greater depth than the blade 254. The blade254 of the high security key blank 250 is a rectangular prism shape.FIG. 9D illustrates a cross section of the blade 254 through the lineE-E illustrated in FIG. 8E. The high security key blank 250 is cut bycutting a track into the upper surface 256 of the blade 254 and/or alower surface of the blade 254 (that is, the surfaces defined by thelength and the width of the blade 254).

It will be appreciated from the above description that keys and keyblanks come in many different shapes and sizes. Indeed, there are anumber of other different key types beyond those that are illustrated inFIGS. 8A to 9D. FIGS. 9E and 9F illustrate examples of possible crosssections of key blades of other key blanks 260, 270. It will also beappreciated from viewing FIGS. 9A to 9E that the blades of differenttypes of keys might be symmetrical or non-symmetrical.

It was explained above that the illumination source 36 is configured toprovide illumination that enables the camera 34 to capture at least oneimage of a key supported by the platform 50, such as a silhouette of thekey. The inventors have realised that the focal/optical distance fromthe camera 34 to the key may vary depending on the height of the keythat is situated on the platform 50. Key heights may vary significantlyfrom one key type to another. The processor 112 is configured to processimages captured by the camera 34 based on a predetermined opticaldistance from the camera 34 to the key. The predetermined opticaldistance is a fixed optical distance from the camera 34 to the key. Ifthe optical distance from the camera 34 to the key is different from thepredetermined optical distance, the key will appear larger (if theoptical distance is smaller than the predetermined optical distance) orsmaller (if the optical distance is greater than the predeterminedoptical distance). In such circumstances the image processing performedby the processor 112 will be inaccurate, potentially leading toincorrect key scanning.

FIG. 10A illustrates an example in which a first key 2100 is placed onthe platform 50. In this example, it is a single-edged cylinder key2100, but might not be in other examples. The single-edged cylinder key2100 has a head 212 and a blade 214 and is a cut version of the keyblank 210 illustrated in FIGS. 8A and 9A.

FIG. 10B illustrates an example in which a second key 2400/2500 isplaced on the platform 50. In this example, it is a dimple key 2400 or ahigh security key 2500, but it might not be in other examples. The key2400/2500 is a cut version of one of the key blanks 240, 250 illustratedin FIGS. 8D, 8E, 9D and 9E.

It can be seen by comparing FIGS. 10A and 10B that, due to thedifference in the thickness of the head 242/252 of the second key2400/2500 compared with the thickness of the head 212 of the first key2100, the blade 244/254 in FIG. 10B is positioned at a greater heightthan the blade 214 in FIG. 10A.

The “height” of a key may be considered to be the height of theuppermost surface of the key 2100, 2400/2500 in the dimension defined bythe z-axis in FIGS. 4A to 7B, 10A and 10B when the key is placed on theplatform 50. Alternatively, it may be considered to be the height of theblade 212, 244/254 of the key 2100, 2400/2500. The height of the blade212, 244/254 of the key 2100, 2400/2500 might or might not be theuppermost surface of the key. In FIG. 10A it is, but in FIG. 10B it isnot.

The height of the key on the platform 50 will depend on the orientationof the key when it is placed on the platform 50. The height of the keyusually corresponds with the extent of the key in a dimension extendinginto and out of the page in respect of FIGS. 8A to 8E, and up and downthe page in respect of FIGS. 9A to 9F. This is the “depth” of the key.The depth of the key is usually the smallest dimension of a key (smallerthan both the length and the width), but it might not be in everyinstance.

The predetermined optical distance may correspond to a particular heightabove the platform 50. If the height of the key does not correspond tothe particular height, the processing of an image captured of the keymight be inaccurate.

FIG. 11 illustrates a schematic of a first method. The first method isfor positioning the platform 50 appropriately to enable the key on theplatform 50 to be imaged.

At block 1001 in FIG. 11 , the user input circuitry 32 of the keyscanning apparatus 100 receives inputs from a user indicating that shewishes to replicate a key. The processor 112 processes the user inputprovided by the user in accordance with the computer program 116 storedin the memory 114. The processor 112 may control the display 30 topresent one or more questions to the user, including one or morequestions about the key to be replicated. The user may be asked, forexample, what type of key the key to be replicated is.

The key height data 181 comprises data indicating the height of variouskeys. As explained above, the height may correspond to the uppermostsurface of a key, or the height of a blade of a key (which might be thesame in some instances). The data may explicitly state the height of thekeys, or be data that enables height to be determined.

The processor 112 may use the information provided by the user todetermine a height of the key to be scanned. Answers to the questionspresented to the user might be associated with a particular key or keysin the key height data 181, and thereby enable the processor 112 todetermine the height of the key to be replicated, from the key heightdata 181, based on the answers provided by the user. For instance, thekey height data 181 stored in the memory 114 may be a look-up table thatcomprises data explicitly indicating the height of various differentkeys.

In block 1002 of FIG. 11 , the processor 112 decides whether to adjust aposition of the platform 112 (for example, based on the answers to thequestions provided by the user, e.g. the key type). In some instances,when the platform 50 is at its default/starting position, the opticaldistance from the camera 34 to the key might correspond with thepredetermined optical distance at which accurate image processing may beperformed by the processor 112. This might be the case in relation tokey types that are “relatively flat”. That is, that have a relativelylow height such as the situation illustrated in FIG. 10A. If the opticaldistance from the camera 34 to the key corresponds with thepredetermined optical distance at which accurate image processing may beperformed by the processor 112 when the platform 50 is at its defaultposition, the platform 50 is not moved.

If the processor 112 decides to adjust a position of the platform 112(for example, based on the answers to the questions provided by theuser, e.g. the key type), the processor 112 retrieves the relevant(portion of the) height data 181, indicating the height of the key to bescanned, and adjusts a position of the platform 50 based on theretrieved height data 181. In this example, the processor 112 adjuststhe position of the platform 50 in the dimension defined by the z-axisin the figures. The dimension defined by the z-axis is a verticaldimension in the figures.

In circumstances in which the processor 112 decides to move the platform50, prior to moving the platform 50, the optical distance from thecamera 34 to the key is a first optical distance which does notcorrespond with the predetermined optical distance at which accurateimage processing may be performed by the processor 112. Movement of theplatform 50 changes the optical distance from the camera 34 to the keyon the platform 50 from the first optical distance to a second opticaldistance. The second optical distance corresponds with the predeterminedoptical distance at which accurate image processing can be performed bythe processor 112. That is, the calibration of the apparatus 100 is suchthat the processor 112 is able to determine one or more properties ofthe key from the images of the key. The one or more properties may begeometrical properties, such as one or more distances.

In addition to, or as an alternative to, using the answers provided bythe user in block 1001 of FIG. 12 to determine whether to move theplatform 50, image processing may be used. The processor 112 mightcontrol the camera 34 to capture one or more images of the key on theplatform 50, prior to moving the platform 50, using light emitted by theillumination source 36. In these embodiments, the key blank outline data182 comprises data defining key blank outlines for comparison withimages captured when the platform 50 is in its default position. Thatis, prior to any movement of the platform 50. Each of these key blankoutlines is associated with height data 181.

In respect of each key blank, the key blank outline data 182 mightdefine a series of points in two dimensions (e.g. x and y dimensions)that define the outline of a key blank. The data might define theoutline of the head 212, 222, 232, 242, 252 and the blade 214, 224, 236,244, 254 of a key blank 210, 220, 230, 240, 250. The processor 112compares one or more images of the key on the platform 50 (captured whenthe platform 50 is in its default position) with the key blank outlinedata 182 to determine a match. If a match is found, the processor 112determines the height data 181 associated with the match and adjusts theposition of the platform 50 based on the height data 181.

Each of the key blank outlines for comparison with images captured whenthe platform 50 is at its default position might not correspond with asingle real-world key blank. In these embodiments, the key blankoutlines are used as a guide to determine whether to adjust the positionof the platform 50 and the extent to which to adjust it (as indicated inthe height data 181), so that more precise image processing can beperformed based on images captured after the position of the platform 50has been adjusted.

In this regard, it is possible to assume from analysing an image of anoutline of a key (e.g. showing that the key has a particular shape/typeof head) that, based on that outline, the blade of the key is likely tobe positioned at a particular height.

In some embodiments, the data that is used by the processor 112 toadjust a position of the platform 50 might not be height data 181. Forexample, the processor 112 might instead control the camera 34 tocapture one or more images of the key on the platform 50, prior tomoving the platform 50, using light emitted by the light source 38and/or the illumination source 36. The processor 112 might then controlmovement of the platform 50 in discrete steps (using the first motor 40)and capture one or more images after each movement step. The processor112 may determine after each step whether the key in the image has movedinto focus or further out of focus relative to a previously capturedimage when the platform 50 was in the previous position. The platform 50might start at an initial position at which the optical distance fromthe camera 34 to a key on the platform 50 is as small as it is expectedto be (i.e. an optical distance corresponding to a key with the lowestexpected height). The processor 112 might move the platform 50 in stepsin one direction (e.g. downwards), capturing at least one image at eachstep. The processor 112 might continue moving the platform 50 away fromthe camera 34 until, when comparing an image with a previous image, itdetermines that the key is moving out of focus. When this occurs, theprocessor 112 may control the first motor 40 to revert the platform 50back to the previous position at which the image of the key was inoptimum focus.

Generally, however, is it preferred to use height data 181 to determinehow to adjust the position of the platform 50 because it enables theplatform 50 to be positioned in its desired position more quickly thanthe imaging method described above, and requires less processing power.

In some alternative embodiments of the invention, a position of theplatform 50 might not be adjusted. It might instead remain stationary.An alternative to moving the platform 50 might instead be to adjust thecamera 34. In this regard, an optical arrangement of the camera 34 mightbe adjusted or a position of the camera 34 might be adjusted (e.g. bychanging the position of the first motor 40 to move the camera 34instead) or both.

FIG. 12 illustrates a schematic of a second method. Blocks 1001 and 1002in FIG. 12 are the same as blocks 1001 and 1002 in FIG. 11 describedabove. FIG. 12 includes further blocks 1003-1009 for enabling the keyscanning apparatus 100 to select an appropriate key blank, such as thoseillustrated in FIGS. 8A to 9F, for use in replicating the key on theplatform 50.

When the platform 50 has been appropriately positioned in block 1002,the method in FIG. 12 continues to block 1003. At block 1003, theprocessor 112 controls the illumination source 36 to provideillumination. The illumination provided by the illumination source 36enables the camera to capture at least one image of the key on theplatform 50 that depicts an outline of the key in two dimensions. Thetwo dimensions are length and width dimensions defined by the x and yaxes respectively in the figures. The key has a length in the lengthdimension, a width in the width dimension and a depth in a depthdimension defined by the z-axis in the figures. The length may begreater than the width, and the width may be greater than the depth. Aspreviously explained, each image may be a silhouette of the key.

In embodiments in which the processor 112 controls the camera 34 tocapture images in order to determine whether to move the platform 50, ifthe platform 50 is not adjusted in block 1002, it is unnecessary tocapture further images in block 1003 in FIG. 12 because the defaultoptical distance corresponds with the predetermined optical distance. Ifthe platform 50 is adjusted in block 1002 in FIG. 12 , the processor 112controls the camera 34 to capture one or more images of the key on the(adjusted) platform 50 in block 1003.

The key blank outline data 182 comprises data defining the outlines of aplurality of key blanks, for comparison with images of keys captured atthe predetermined optical distance. In respect of each key blank, thedata might define a series of points in two dimensions (e.g. x and ydimensions) that define the outline of a key blank. The data mightdefine the outline of the head 212, 222, 232, 242, 252 and the blade214, 224, 236, 244, 254 of a key blank 210, 220, 230, 240, 250 (and,where appropriate such as in the case of a lever key blank 230, theshaft 234).

In block 1004 in FIG. 12 , the processor 112 processes one or moreimages by identifying an outline of the key. The processor 112 comparesthe outline of the key in the image(s) captured by the camera 34 withthe outlines defined in the key blank outline data 182 and searches fora match. The processor 112 might not find an exact match, because thekey placed on the platform 50 is a cut key, whereas the outlines definedin the key blank outline data 182 define the outline of (pre-cut) keyblanks. Thus, in some circumstances the outline of any key blank outlinein the data 182 will not correspond precisely with the outline of thekey in the captured image(s).

It might be difficult to match the key in the image(s) with acorresponding key blank in the key blank outline data 182 if the outlineof the (whole) key is not very distinctive. For example, the inventorshave found that general outline matching typically works well for leverkeys (e.g. cut from the lever key blank 230 illustrated in FIGS. 8C and9C), but less well for dimple keys and high security keys (e.g. cut fromthe dimple key blank 240 and the high security blank 250 illustrated inFIGS. 8D, 8E, 9D and 9E).

The inventors have found that a more precise analysis of the blade ofthe key in the image enable an appropriate type of key blank to beidentified more accurately and consistently for many key types. If amatch is found in block 1004, the method proceeds to block 1005 in FIG.12 . If a match is not found, the method proceeds to block 1007 in FIG.12 .

In some examples, at block 1001 the user might be asked (e.g. by theprocessor 112 controlling the display 30) to provide an indication as tothe type of key to be scanned. If, for example, an indication isprovided by the user (e.g. via the user input circuitry 32) indicating atype of key that for which is known not to be easily identifiable bygeneral outline matching, the processor 112 might not attempt to carryout any general outline matching in block 1004.

In block 1007 in FIG. 12 , when a corresponding key blank has not beenidentified using outline matching, the processor 112 attempts toidentify an appropriate key blank by performing a more comprehensiveanalysis of the blade of the key in the image captured by the camera 34.FIG. 13 illustrates a method in which an analysis of the blade of thekey is performed in order to identify an appropriate key blank. FIGS.14A and 14B illustrates an example of a key 2100 which may be analysed.The key 2100 could be any type of key. In this particular example, thekey 2100 is a single-edged cylinder key 2100 which may, for instance,have been cut from the key blank 210 illustrated in FIGS. 8A and 9E.

FIG. 14A illustrates a plan view of the key 2100. The key 2100 comprisesa head 212 and a blade 214. The key 2100 (and the blade 214 of the key2100) has a length that extends in a length dimension which is definedby the x-axis in FIG. 14A. The key 2100 (and the blade 214 of the key2100) has a width that extends in a width dimension which is defined bythe y-axis in FIG. 14A. The key 2100 (and the blade 214 of the key 2100)has a depth that extends in a depth dimension which is defined by thez-axis in FIG. 14A. The length dimension, the width dimension and thedepth dimension are orthogonal to one another.

The blade 214 has a tip 217. The tip 217 of the key 2100 is located atthe opposite end of the blade 214 from the head 212 in the lengthdimension. It is the extremity of the blade 214. FIG. 14B illustrates aview of the key 2100 as seen when looking towards the tip 217 of the key2100.

In the illustrated example, the head 212 of the key blank 2100 issubstantially flat, but the blade 214 is not (as shown in FIG. 14B). Theblade 214 has at least one elongate recess 213 in the illustratedexample. The elongate recess 213 is elongate in the length dimension.

A lengthwise edge 216 of the blade 214 has been cut to provide afunctional key. In this example, given that the key 2100 issingle-sided, the opposite lengthwise edge 215 of the blade 214 has notbeen cut. In other examples in which the key is double-sided, theopposite edge 215 is also cut.

The key 2100 comprises a shoulder/stop 211. The stop 211 defines the endof the blade 214. When the blade 214 of the key 2100 is placed into acompatible keyhole of a lock tip 217 first, the stop 211 prevents theremainder of the key 2100 from entering the keyhole.

In block 1007A in FIG. 13 , the processor 112 identifies the blade inthe at least one image. In block 1007B in FIG. 13 , the processor 112processes the image to simulate reconstruction of at least one edge ofthe blade 214 of the key 2100 along the length dimension and therebyform a reconstructed key.

FIG. 15 illustrates an example of how the key 2100 may be reconstructed.The outline of the key 2100 depicted in the image is illustrated in FIG.15 . The processor 112 initially identifies the tip 217. The tip 217 maybe identified by determining from the image the portion of the key 2100that has the smallest extent in the width dimension. The processor 112then determines the extent of the width of the blade 214 of the key 2100at a series of positions along the length of the blade 214, moving fromthe tip 217 towards the head 212. Each position might correspond, forexample, to the next row of pixels in the image. At each position, theprocessor 212 determines the extent of the edge 216 in the widthdimension, and determines whether that extent is greater, the same as,or smaller than the greatest extent previously determined (e.g. asmeasured from a virtual reference line extending down the blade 214 inthe length dimension). If the extent of the edge 216 is greater thangreatest extent previously determined, it becomes the new greatestextent and no reconstruction is performed at that position. If theextent of the edge is the same as the greatest extent previouslydetermined, no action is taken. If the extent of the edge 216 is smallerthan the greatest extent previously measured, reconstruction of the edge216 is performed by (virtually) increasing the extent of the edge 216 ofthe blade 214 at that position to the previously measured greatestextent. The shaded regions in FIG. 15 indicate the reconstructed partsof the (blade 214 of the) key 2100 that result from carrying out thisprocess.

The processor 112 may seek to determine the location of the stop 211 inorder to determine when to cease carrying out the reconstructionprocess. In this regard, the processor 112 may determine the angle ofedge 216 of the blade 214 (e.g. at each of the series of the positionsmentioned above, or a subset of those positions). If an angle at aparticular position is determined to be within a particular angularrange, the processor 112 might determine that that position correspondswith the position of the stop 211. For example, if the angle isdetermined to be substantially 90° as measured from the length dimension(defined by the x-axis in FIG. 15 ) in respect of a particular position,that position is determined to be the position of the stop 211. Theangular range might be 80°-100°, or 85°-95°, for instance.

By carrying out the above process, the processor 112 is able todetermine a length L of the reconstructed blade and a maximum width W ofthe reconstructed blade, as shown in FIG. 15 . The maximum width W ofthe reconstructed blade is the width of the blade (immediately) adjacentto the stop 211 (above the stop 211 in FIG. 15 ). The length L of thereconstructed blade is the distance from the tip 217 to the stop 211.

The length L of the reconstructed blade corresponds with a maximum“travel distance” of the blade 214 into a keyhole of a lock. That is, ifthe lock is compatible with the key 2100 the blade 214 will travel fullyinto the keyhole, such that the travel distance corresponds with thelength L of the reconstructed blade.

Next, the processor 112 seeks to identify one or more key blanks thatmight match the key blank from which the key 2100 was cut (in this case,the key blank 210 illustrated in FIGS. 8A and 9A).

The key blank blade data 183 stored in the memory 114 comprises datadefining the blades of key blanks. In respect of each key blank, alength value and a width value of the blade is stored. In effect, thelength value and the width value define a two-dimensional area thatrepresents the area of the blade of the key blade in a plane defined bythe length dimension and the width dimension.

In block 1007C, the processor 112 determines a travel distance, for thereconstructed key in the length dimension, into each of the plurality oftwo-dimensional areas that define a blade of a key blank. This is doneby comparing the width of the reconstructed key with the width of atwo-dimensional area at multiple positions along a length L of thereconstructed key from the tip 217 of the reconstructed blade.

The travel distance corresponds with a distance from the tip 217 of thereconstructed blade to a position along the length dimension at whichthe width of the reconstructed key becomes greater than the width of thetwo-dimensional area.

After the travel distance has been determined, in block 1007D in FIG. 13the processor 112 determines, for the two-dimensional area, a width ofthe reconstructed key at a position along the length dimension thatcorresponds, at least approximately, with the travel distance. If thetravel distance corresponds with the whole length L of the blade 214,the relevant width of the reconstructed key is the maximum width W. Ifthe travel distance is lower, the relevant width may be less than themaximum width W.

In block 1007D in FIG. 13 , the processor 112 determines whether thetravel distance of the reconstructed key matches, at leastapproximately, the length of the two-dimensional area. The processor 112also determines whether the determined width of the reconstructed key,at a position along the length of the reconstructed key defined by thetravel distance, at least approximately matches the width of thetwo-dimensional area.

In carrying out this process, the processor 112 is simulating the entryof the reconstructed blade of the key into a virtual two-dimensionalaperture that corresponds with the dimensions of a blade of a key blank.

If the travel distance of the reconstructed key matches the length ofthe two-dimensional area and the determined width of the reconstructedkey (at a position along the length of the reconstructed key defined bythe travel distance) matches the width of the two-dimensional area, thekey blank defined by the two-dimensional area represents a good matchand might be the key blank from which the key was cut. In block 1007D inFIG. 13 , the processor 112 identifies that key blank as a possiblematch.

The processor 112 repeats the process described above in relation toblocks 1007C to 1007E in order to identify possible key blanks for thekey 2100.

If only a single key blank is identified as part of the above process,the processor 112 may determine at this point that that key blank is thecorrect key blank. Further filtering might not be necessary. In someembodiments, however, further processing may be performed to verify thatthe identified key blank is the correct key blank. Further processingmay also be performed if multiple possible matching key blanks areidentified. In order to perform the further processing, the method movesto block 1008 in FIG. 12 .

In block 1008 of FIG. 12 , the processor 112 is configured to controlthe light source 38 to direct a beam of light to a position on the bladein the length dimension that corresponds, at least approximately, withthe travel distance. The reference numeral 39 in FIGS. 4A, 4B, 7A and 7Billustrate the direction in which the beam of light is transmitted.

The processor 112 controls the light source 38 to direct the beam oflight to the portion of the blade 214 that is adjacent to the stop 211(immediately above the stop 211 in FIG. 14A). This is because typicallythere is an uncut portion of the (edge 216 of the) blade 214 in theregion of the blade 214 adjacent the stop 211. The depth profile of thisuncut portion in the width dimension will substantially match the depthprofile of the corresponding portion of the matching key blank.

The processor 112 may cause the camera 34 to capture at least one imageof the reflection, from the blade 214 of the key 2100, of at least aportion of the beam of light. The beam of light emitted by the lightsource 38 might be shaped to define a line that extends across the blade214 of the key 2100 in the width dimension.

FIG. 16A illustrates a cross-section of the key 2100 illustrated inFIGS. 14A and 14B at the region of the blade 214 adjacent the stop 210.FIG. 16B illustrates an example of an image captured by the camera 34 ofa reflection of a line of light 1210 of the upper surface of the key2100 illustrated in FIG. 16A. The line reflection 1210 includes portions1213, 1215, 1216 that correspond with the elongate recess 213 and theedges 215, 216 of the blade 214. The image defines at least a portion ofthe key 2100 in two dimensions (the width and depth dimensions).

The key blank blade data 183 may include a two-dimensional profile of aplurality of key blanks, including the two-dimensional profile of eachof the key blanks that were identified in block 1007F in FIG. 13 . Thetwo dimensions defining the profile are the width and depth dimensions.

In block 1009 in FIG. 12 , the processor 112 may compare the image ofthe reflection (such as that illustrated in FIG. 16B) with atwo-dimensional profile of each of the key blanks that were identifiedin block 1007F in FIG. 13 . In making the comparison, the processor 112may identify one or more matching key blanks. The processor 112 mayconfirm that the single key blank that was identified in block 1007F ofFIG. 13 is, in fact, a matching key blank. Alternatively the processor112 may further filter the key blanks that were identified in block1007F in FIG. 13 , for instance, such that a single matching key blankis identified.

The key blank blade data 183 may be associated with the key replicationdata 184. The key replication data 184 stored in the memory 114comprises data, for a plurality of key blanks, defining a plurality ofdecoding positions/spacings (in the length dimension of the blade) foreach key blank at which a cut in the key blank, having one or moreparticular properties, would correspond to a particular alphanumericcharacter in a code for a key.

Thus, if the processor 112 determines a matching key blank in the keyblank blade data 183 in block 1009 of FIG. 12 or block 1007F of FIG. 13, the processor 112 can also determine the associated portion of the keyreplication data 184 for that particular matching key blank. That is,the processor 112 can determine from associated portion of the keyreplication data 184 a plurality of decoding positions/spacings (in thelength dimension of the blade) for the matching key blank at which a cutin the matching key blank, having one or more particular properties,would correspond to a particular alphanumeric character in a code in akey cut from the key blank.

In some cases, the processor 112 might control the display 30 toinstruct the user to turn the key over so that the other face of theblade 214 (defined by the length and width dimensions) can be imagedusing the light source 38 and the camera 34.

In some embodiments, the processor 112 is configured to control thelight source 38 to move into a plurality of different positions in orderto direct the beam of light to a plurality of different positions on theblade 214 in the length dimension, each of which corresponds, at leastapproximately, with the travel distance. At least some of thosedifferent portions are smaller than the travel distance and are offsetfrom the travel distance in the length dimension (e.g. by a smalldistance). The processor 112 may cause the camera 34 to capture at leastone image of a reflection, from the blade 214 of the key 2100, of atleast a portion of the beam of light in respect of each of the pluralityof different positions of the light source 38.

The plurality of images may be combined, by the processor 112, usingimage averaging to form a combined image. The combined image may becompared with a two-dimensional profile of each of the one or moreidentified key blanks.

If one or more outline matches is found in block 1004 in FIG. 12 , themethod proceeds to block 1005 in FIG. 12 . The process carried out inblocks 1005 and 1006 of FIG. 12 is the same as that carried out inblocks 1008 and 1009 of FIG. 12 , which are described above. It mightnot be necessary to carry out blocks 1005 and 1006 in FIG. 12 if asingle matching key blank is identified in block 1004.

The key blanks identified in the key blank outline data 182 may beassociated with the key replication data 184.

If the processor 112 determines a matching key blank in the key blankoutline data 182 in block 1004 or 1006 of FIG. 12 , the processor 112can also determine the associated portion of the key replication data184 for that particular matching key blank. That is, the processor 112can determine from the associated portion of the key replication data184 a plurality of decoding positions/spacings (in the length dimensionof the blade) for the matching key blank at which a cut in the matchingkey blank, having one or more particular properties, would correspond toa particular alphanumeric character in a code in a key cut from the keyblank.

FIG. 17A illustrates an example of a dimple key 2400 cut from the dimplekey blank 240 illustrated in FIGS. 8D and 9D. The blade 244 of thedimple key 2400 is the functional part of the key when the key is placedinto a lock in order to lock or unlock the lock. The dimple key 2400 hasbeen cut by cutting dimples (dome-shapes) into the face 246 of the keyblade 244 at a plurality of predefined positions A-F along the length ofthe blade 244. The positions are known as “spacings” and are set by themanufacturer of the key. In the illustrated example, the lengthdimension of the key blade 244 is defined by the x-axis, the widthdimension is defined by the y-axis and the depth dimension is defined bythe z-axis.

The positions/spacings A-F may be defined from the tip 247 of the key2400. The tip 247 of the key 2400 is located at the opposite end of theblade 244 from the head 242 in the length dimension. It is the extremityof the blade 244. Alternatively, the positions/spacings may be definedfrom a shoulder/stop near the head 242 of the key 2400. Theshoulder/stop of the key 2400 is a portion of the key 2400 that limitsthe extent to which the blade 244 may enter a lock before it can go nofurther. The shoulder/stop abuts a portion of the lock to prevent theblade 244 from entering further. In some instances, thepositions/spacings may be defined from a “virtual shoulder/position”near the head 242. The position of the (virtual) shoulder/stop is aknown distance in the length dimension from the tip 247 of the blade244.

The location and/or size of the dimple cut at each of the locations A-Fis set by a particular code. Each alphanumeric character in the code maycorrespond to a dimple cut of a particular size at a particular spacingalong the length dimension of the blade 244, and/or may correspond tothe position of the dimple cut in the width dimension at a spacing alongthe length dimension of the blade 244. The plurality of predefinedpositions/spacings A-F can be considered to be “decoding positions” inthat the code for the key 2500 can be determined by determining the sizeof the dimple cut (e.g. in the depth dimension and/or the widthdimension) and/or the position of the dimple cut in the width dimensionat each spacing.

In other examples, the key might not be a dimple key 2400 and thereforethe cuts might not be dimple cuts. The cuts might be discrete cuts intothe face of the blade 246, as is the case with the dimple key 2400, orthere might instead be a single continuous cut.

FIG. 17B illustrates an example of a high security key cut 2500 from thehigh security blank 250 illustrated in FIGS. 8E and 9D. The illustratedhigh security key 2500 is an example of a key in which there is a singlecontinuous cut. The high security key 2500 has been cut by cutting acontinuous track into the face 256 (e.g. by milling). In this example,there are four positions/spacings A-D, where a position of the cut inthe width dimension at a particular spacing in the length dimensioncorresponds with a particular alphanumeric character in the code thatdefines the key 2500.

In other examples, the key might not be a dimple key 2400 or a highsecurity key 2500 as illustrated in FIGS. 17A and 17B. It might, forexample, be a tibbe key or an AVA key.

FIG. 18 illustrates a schematic of a method for decoding a key, such asthe keys illustrated in FIGS. 17A and 17B. At block 1801 in FIG. 18 ,the user input circuitry 32 of the key scanning apparatus 100 receivesinputs from a user indicating that she wishes to replicate a key. Thesemay be the same inputs provided in block 1001 in FIG. 12 . The processor112 processes the user input provided by the user in accordance with thecomputer program 116 stored in the memory 114. The processor 112 maycontrol the display 30 to present one or more questions to the user,including one or more questions about the key to be replicated. The usermay be asked, for example, what type of key the key to be replicated is.In some instances, the user might not be asked any such questions.

If the user is asked such questions, answers to the questions presentedto the user might be associated with a particular key or keys in the keyreplication data 184, and thereby enable the processor 112 to determinethe height of the key to be replicated, from the key replication data184, based on the answers provided by the user. Additionally oralternatively, the processor 112 might carry out the method illustratedin FIG. 12 (and possibly FIG. 13 ) to determine a key blank in the keyblank outline data 182 and/or the key blank blade data 183 thatcorresponds with the key to be decoded, and then determine an associatedportion of the key replication data 184 for that key blank (which alsorelates to the cut key to be replicated).

As explained above, the key replication data 184 stored in the memory114 comprises data, for a plurality of keys, defining a plurality ofdecoding positions/spacings (in the length dimension of the blade) foreach key at which a cut having one or more particular propertiescorresponds to a particular alphanumeric character in a code for thekey. The processor 112 may use the information provided by the user todetermine the relevant decoding positions/spacings for the key to bescanned.

For instance, the key replication data 184 stored in the memory 114 maybe a look-up table that comprises data explicitly indicating thedecoding positions/spacings of various different keys. The decodingpositions/spacings in the key replication data 184 are defined inreference frame of the key itself. Those skilled in the art willappreciate that while a visual marker 170 may be provided indicatingwhere to position the tip 247, 257 of the key 2400, 2500 on thesupport/platform 50, a user may in practice fail to position the key2400, 2500 correctly.

The processor 112 controls the illumination source 36 to provideillumination. As explained above, the illumination provided by theillumination source 36 enables the camera 34 to capture at least oneimage of the key on the platform 50 that depicts an outline of the key2400, 2500 in two dimensions. The two dimensions are length and widthdimensions defined by the x and y axes respectively in the figures. Thekey has a length in the length dimension, a width in the width dimensionand a depth in a depth dimension defined by the z-axis in the figures.The length may be greater than the width, and the width may be greaterthan the depth.

The image(s) may be that/those captured in block 1003 in FIG. 12 . Aspreviously explained, each image may be a silhouette of the key.

The processor 112 processes the images to determine the location of thetip 247, 257 of the key 2400, 2500. The processor 112 may then, based onboth the determination of the location of the tip 247, 257 of the key2400, 2500 and the predefined decoding positions/spacings in the keyreplication data 184, determine the actual decoding positions that thebeam of light from the light source 38 should be directed towards inorder to scan (and thereby decode) the key, in the reference frame ofthe key scanning apparatus 100. If the decoding positions are defined inthe key replication data 184 in relation to the stop 211 or a virtualstop, the key replication data 194 might also indicate the distance fromthe tip 217 to the stop/virtual stop 211, thereby enabling the decodingpositions to be determined.

At block 1802 in FIG. 18 , the processor 112 controls the second motor42 to adjust a position of the light source 38, in order to cause thelight source 38 to direct the beam of light towards the blade of the key2400, 2500 at each of the plurality of decoding positions. For eachdecoding position, the processor 112 obtains at least one image from thecamera 34 of at least a portion of the beam of light reflected from theupper surface 246, 256 of the blade 244, 254 of the key at each of theplurality of decoding positions. In some cases, the key 2400, 2500 mightbe double-sided, and thus the processor 112 might control the display 30to instruct the user to turn the key 2400, 2500 over. Once the user hasindicated that this has been done via the user input circuitry 32, theprocessor 112 might repeat the process of determining the location ofthe tip 247, 257 of the blade 244, 254 and obtaining at least one imagefrom the camera 34 of at least a portion of the beam of light reflectedfrom the surface of the blade 244, 254 of the key at each of theplurality of decoding positions.

The beam of light emitted by the light source 38 might be shaped todefine a line across the blade 244, 254 of the key 2400, 2500, in thewidth dimension.

By way of example, FIG. 19A illustrates a cross section of the highsecurity key illustrated in FIG. 17B through the line B-B. FIG. 19Billustrates an example of an image captured by the camera 34 of areflection of a line of light 1250 from the upper surface of the highsecurity key illustrated in FIG. 19A.

At block 1803 in FIG. 18 , the processor 112 determines one or moreproperties of a shape of the blade 244, 254 of the key 2400, 2500 ateach of the plurality of decoding positions by analysing the imagescaptured by the camera 34, in order to decode the key.

For instance, in the example illustrated in FIGS. 19A and 19B, aproperty of the shape of the blade 254 of the key 2500 that isdetermined is a position, in the width dimension of the blade 254, of acut into the face 256 of the blade 254 of the key 2500. In this example,the position is determined by determining a distance 259 a, in the widthdimension, from an edge 258 of the blade to the commencement of the cutin the blade 254. This distance 259 a in FIG. 19A corresponds with thedistance 1259 a in FIG. 19B, as measured from a portion 1258 of the linereflection 1250.

In other examples, other properties may be determined instead of or inaddition to a position, in the width dimension, of a cut into the face256 of the blade 254. The property or properties that is determined willdepend upon the property or properties that must be determined in orderto decode the key (which will, in turn, depend on the type of key beingdecoded). For instance, in other examples, additionally oralternatively, a depth of cut 259 b into the blade 254 of the key 2500in the depth dimension and/or a width of cut 259 c into the blade 254 ofthe key 2500 in the depth dimension might be determined. Thesecorrespond with the portions of the distances 1259 b and 1259 c markedin FIG. 19B respectively, in relation to the illustrated line of light1250.

In order to improve the quality of the decoding, for each decodingposition, the processor 112 might cause the light source 38 to directthe beam of light to positions that are positioned adjacent to eachdecoding position. These positions may be offset from each decodingposition by a (small) distance in the length dimension. The processor112 may obtain an image, from the camera 34, of the reflected beam oflight in respect of each of those offset positions. Any images that arecaptured in respect of the decoding position or positions that areslightly offset from it are then considered to pertain to the decodingposition.

In respect of each decoding position, the processor 112 might thencombine the images (captured at the decoding position or positions thatare slightly offset from it) and determine an average value for aproperty when determining the one or more properties of the shape of theblade of the key. For example, multiple images might be captured andaverage values determined when determining a position of cut from anedge 258 of the blade 254, a depth of cut 259 b into the blade 254and/or a width of cut 259 c into the blade 254. This might help toovercomes issues that could arise due to imperfections in the key 2500,such as wear of the tip 257 that has reduced the length of the blade256, or the presence of foreign matter (e.g. dirt) in the cut that couldresult in a reflected line of light 1250 being captured that does notaccurately reflect the nature of the cut in the key 2500.

FIG. 20 illustrates a method of decoding an edge cut key, such as thatillustrated in FIG. 21 . The method may be an extension of the methoddescribed above in relation to FIG. 12 . The method illustrated in FIG.20 will be described below in relation to the single-edged cylinder key2100 illustrated in FIGS. 14A and 14B. The method is, however,applicable to any type of edge cut key, including residential andautomotive keys, and double-sided edge cut keys.

An edge 216 of the key 2100 illustrated in FIG. 21 has been cut at aplurality of predefined positions A-E along the length of the blade 214.The positions are known as “spacings” and are set by the manufacturer ofthe key. In the illustrated example, the length dimension of the keyblade 214 is defined by the x-axis, the width dimension is defined bythe y-axis and the depth dimension is defined by the z-axis.

The positions/spacings A-E may be defined from the tip 217 of the key2100. The tip 217 of the key 2100 is located at the opposite end of theblade 214 from the head 212 in the length dimension. It is the extremityof the blade 214. Alternatively, the positions/spacings may be definedfrom the shoulder/stop 211 near the head 212 of the key 2100. Theshoulder/stop 211 of the key 2100 is a portion of the key 2100 thatlimits the extent to which the blade 214 may enter a lock before it cango no further. The shoulder/stop abuts a portion of the lock to preventthe blade 214 from entering further. In some instances, thepositions/spacings may be defined from a “virtual shoulder/position”near the head 212. The position of the (virtual) shoulder/stop is aknown distance in the length dimension from the tip 217 of the blade214.

The size of the cut at each of the locations A-E is set by a particularcode. The “size” of the cut may be the extent of the cut in the widthdimension, defined by the y-axis in the figures. Each alphanumericcharacter in the code may correspond to a cut of a particular size inthe edge 216 of the blade 214 at a particular spacing along the lengthdimension of the blade 214. The plurality of predefinedpositions/spacings A-E can be considered to be “decoding positions” inthat the code for the key 2100 can be determined by determining the sizeof cut (in the width dimension) at each spacing.

The user input circuitry 32 of the key scanning apparatus 100 receivesinputs from a user indicating that she wishes to replicate a key. Thesemay be the same inputs provided in block 1001 in FIG. 12 . The processor112 processes the user input provided by the user in accordance with thecomputer program 116 stored in the memory 114. The processor 112 maycontrol the display 30 to present one or more questions to the user,including one or more questions about the key to be replicated. If theuser is asked such questions, answers to the questions presented to theuser might be associated with a particular key or keys in the keyreplication data 184, and thereby enable the processor 112 to determinethe height of the key to be replicated, from the key replication data184, based on the answers provided by the user. Additionally oralternatively, the processor 112 might carry out the method illustratedin FIG. 12 (and possibly FIG. 13 ) to determine a key blank in the keyblank outline data 182 and/or the key blank blade data 183 thatcorresponds with the key to be decoded, and then determine an associatedportion of the key replication data 184 for that key blank (which alsorelates to the cut key to be replicated).

The key replication data 184 stored in the memory 114 comprises data,for a plurality of keys, defining a plurality of decodingpositions/spacings (in the length dimension of the blade) for each keyat which a cut having one or more particular properties corresponds to aparticular alphanumeric character in a code for the key. The processor112 may use the information provided by the user to determine therelevant decoding positions/spacings for the key to be scanned. Forinstance, the key replication data 184 stored in the memory 114 may be alook-up table that comprises data explicitly indicating the decodingpositions/spacings of various different keys.

The decoding positions/spacings in the key replication data 184 aredefined in reference frame of the key itself. Those skilled in the artwill appreciate that while a visual marker 170 may be providedindicating where to position the tip 217 of the key 2100 on thesupport/platform 50, a user may in practice fail to position the key2100 correctly.

The processor 112 controls the illumination source 36 to provideillumination and causes the camera 34 to capture one or more images ofthe key 2100. As explained above, the illumination provided by theillumination source 36 enables the camera 34 to capture at least oneimage of the key 2100 on the platform 50 that depicts an outline of thekey 2100 in two dimensions. The two dimensions are length and widthdimensions defined by the x and y axes respectively in the figures. Theblade 214 of the key 2100 has a length in the length dimension, a widthin the width dimension and a depth in a depth dimension defined by thez-axis in the figures. The length may be greater than the width, and thewidth may be greater than the depth.

The image(s) may be that/those captured in block 1003 in FIG. 12 . Aspreviously explained, each image may be a silhouette of the key.

In block 2002 in FIG. 20 , the processor 12 determines, at least in partfrom the stored key replication data 184, a plurality of decodingpositions A-E for cuts in the blade 214 of the key 2100. These are the“theoretical” decoding positions A-E along the length of the blade 214at which the cuts in the edge 216 of the blade 214 should be located.

The processor 112 processes the images to determine the location of thetip 217 of the key 2100. The processor 112 may then, based on both thedetermination of the location of the tip 217 of the key 2100 and thepredefined decoding positions/spacings in the key replication data 184,determine the where the “theoretical” decoding positions are located inthe image. If the decoding positions are defined in the key replicationdata 184 in relation to the stop 211 or a virtual stop, the keyreplication data 194 might also indicate the distance from the tip 217to the stop/virtual stop 211, thereby enabling the theoretical decodingpositions to be determined.

The theoretical decoding positions that are determined using the keyreplication data 184 might not match the positions of the cuts in theedge 216 of the blade 214 in practice. This might be because the tip 217has worn through use, for instance, or due to differences in the lengthof the blade 217 or key 2100 that can occur due to manufacturingtolerances.

At block 2003 in FIG. 20 , the processor 112 determine a plurality ofexamining positions 1-20 on the edge 216 of the blade 214, for eachtheoretical decoding position A-E, at which to examine the cuts in theedge 216 of the blade 214 depicted in the captured image.

FIG. 22A illustrates a cut in the blade 214. This might be any of thecuts in the edge 216 of the blade 214. Twenty examining positions aremarked with the reference numerals 1-20 in FIG. 22A. There might be moreor fewer examining positions in other examples. The examining positionsfor a particular, “theoretical”, decoding position are determined basedon the location of the theoretical decoding position in the image. Oneof the examining positions might correspond, in the length dimension,with the theoretical decoding position.

There might be at least one examining position, spaced from thetheoretical decoding position, on either side of the theoreticaldecoding position in the length dimension (defined by the x-axis in thefigures). For instance, the examining position corresponding with thetheoretical decoding position could be examining position 10 illustratedin FIG. 22A. Examining positions 1-9 are on one side of that andexamining positions 11-20 are on the other side. The examining positions1-20 might be equally spaced from each other along the length dimension.

There are a plurality of examining positions 1-20 that are associatedwith each theoretical decoding position A-E. That is, examiningpositions A1-A20 for theoretical decoding position A, examiningpositions B1-B20 for theoretical decoding position B, examiningpositions C1-C20 for theoretical decoding position C, examiningpositions D1-D20 for theoretical decoding position D and examiningpositions E1-E20 for theoretical decoding position E.

An examining position in each plurality corresponds with anotherexamining position in each other plurality. Each corresponding examiningposition is the same distance from the theoretical decoding positionthat it is associated with. That is, each corresponding examiningposition is offset from its associated theoretical decoding position inthe length dimension by the same distance (and the offset might bezero).

The corresponding examining positions form a set of correspondingexamining positions. For example, A5, B5, C5, D5 and E5 arecorresponding examining positions and together form a set ofcorresponding examining positions. Each corresponding examining positionis the same distance in the length dimension from its theoreticaldecoding position, each of which might be located at A10, B10, C10, D10and E10, for instance.

In block 2004 in FIG. 20 , for each set of examining positions, theprocessor 112 examines the cuts in the edge 216 of the blade 214 bydetermining, for each corresponding examining position in a set ofcorresponding examining positions, how long the edge 216 of the blade214 remains substantially parallel to the length dimension. In order todo this for a particular examining position, the processor 112 mightdetermine an angle between that examining position and other positionsalong the edge 216 of the blade in the length dimension, such as theother examining positions in the plurality of examining positions.

For example, consider a situation in which the processor 112 isdetermining, in relation to examining position A10, how long the edge216 of the blade 214 remains substantially parallel from examiningposition A10 in the length dimension. The processor 112 might measure anangle (e.g. with respect an axis that is parallel to or co-incident withthe length dimension) of a virtual line between the examining positionA10 and other positions that are given distances away from the examiningposition (e.g. the other examining position A1-A9, A11-A20 in theplurality of examining positions for that theoretical decoding positionA).

FIG. 22B illustrates a virtual line 221 extending between positions 10,14, e.g. positions A10 and A14. The virtual line 221 is parallel to orco-incident with the length dimension (defined by the x-axis). The anglethat the virtual line makes with the x-axis is therefore zero. FIG. 22Cillustrates a virtual line 222 extending between two positions 10, 16,e.g. positions A10 and A16. The virtual line 222 makes an angle θ withthe x-axis.

If the angle that the virtual line makes with the x-axis falls outside aparticular range, e.g. −2° to +2°, the processor 112 may determine thatthe edge 216 of the blade 214 is not flat between those positions. Forexample, the processor 112 would determine that the edge 216 betweenpositions 10 and 14 in FIG. 22B is substantially flat. The processor 112would determine that the edge 216 is not flat between examiningpositions 10 and 16 in FIG. 22C.

In block 2005 in FIG. 20 , the processor 112 determines at least onevalue to store (e.g. in the memory 14), for each set of examiningpositions, corresponding with how long the edge 216 of the blade 214remains substantially parallel to the length dimension. That is, the atleast one value is indicative of the length the blade 214 remainssubstantially parallel to the length dimension.

In some examples, the processor 112 might record a zero value if itdetermines that the edge 216 is not substantially flat between aparticular pair of positions (e.g. positions 10 and 16 in illustratedFIG. 22C) and a non-zero value (e.g. 1) if it determines that the edge216 is substantially flat between a particular pair of positions (e.g.positions 10 and 14 illustrated in FIG. 22B).

In respect of a particular examining position, the processor 112 mightperform the virtual line angle analysis for a number of positions alongthe edge 216 of the blade 214 in each direction in the length dimension.The processor 112 might perform the virtual line analysis in a directionin the length dimension until it determines that the edge 216 is notflat between the two positions. Thus, in respect of examining position10, the processor 112 might perform the virtual line analysis in therightwards direction in relation to positions 10 and 11 (substantiallyflat), then positions 10 and 12 (substantially flat), then positions 10and 13 (substantially flat), then positions 10 and 14 (substantiallyflat) before stopping the analysis in the rightwards direction afterdetermining that the virtual line between positions 10 and 15 is notsubstantially flat. Alternatively, the virtual line analysis might beperformed between adjacent positions (e.g. between positions 10 and 11,then between positions 11 and 12, then between positions 12 and 13, thebetween positions 13 and 14, then between positions 14 and 15). Thismight achieve the same result.

The spacing between each pair of adjacent positions might be the same,and is smaller than the spacing between adjacent theoretical decodingpositions A-E. For example, the analysis could be performed for acertain maximum number of positions either side of the particularexamining position (e.g. 50).

In respect of examining position 13 in FIG. 22A, the processor 112 willrecord a non-zero value when assessing the angle of virtual lines toeach of position 13 to each of positions 7, 8, 9, 10, 11, 12 and 14. Theprocessor 112 might sum the recorded values. A zero value is recordedwhen assessing the angle of virtual lines to each of neighbouringpositions 6 and 15. If each non-zero value is 1, the sum of the recordedvalues is 7.

The processor 112 performs this process in respect of each correspondingexamining position in a set of examining positions. The processor 112might then combine those values (e.g. by adding) to determine at leastone value to store for the set of corresponding examining positions. Forexample, a set of examining positions might include the correspondingexamining positions A13, B13, C13, D13, E13. The value that is recordedfor each examining position might or might not be the same, depending onthe results of the analysis performed by the processor 112. For example,it might be 7+7+6+7+6=33.

The processor 112 performs this process for each set of examiningpositions. For instance, the value stored for the set of examiningpositions A13, B13, C13, D13 and E13 might be 33 as indicated above,whereas the value stored for the set of examining positions A16, B16,C16, D16 and E16 scored on the same basis might be 0.

It will be appreciated by those skilled in the art that the manner inwhich a score/value is derived that is indicative of how long the edge216 of the blade 214 remains substantially parallel to the lengthdimension may differ from that described above. For example, theprocessor 112 might instead perform the virtual line analysis inrelation to a limited (maximum) number of “nearest neighbour positions”in each direction from a particular examining position (e.g. positions7-9 and 11-13 for examining position 10), and then derive scores in themanner described above or a different manner.

In block 2006 in FIG. 20 , the processor 112 determines, from the storedvalues, an optimum set of examining positions at which to determine,from the at least one image, a size of each cut in the blade of the key.

For example, the processor 112 may compare the one or more values thathave been stored for each set of corresponding examining positions withthe one or more values that have been stored for the other sets ofcorresponding examining positions (e.g. the score for A10, B10, C10, D10and E10 vs the score for A16, B16, C16, D16 and E16). In making thiscomparison, the processor 112 can determine an optimum set of examiningpositions at which decoding should be performed. For example, theprocessor 112 may determine that a value stored for the set of examiningpositions A10, B10, C10, D10 and E10 is greater than the value storedfor each of the other sets of corresponding examining positions, andtherefore determine that that set of corresponding examining positionsis the optimum set of corresponding examining positions.

The distance between adjacent examining positions (e.g. A10 and B10) inthe optimum set of examining positions A10, B10, C10, D10 and E10 is thesame as the distance between adjacent decoding positions (e.g. A and B)in the “theoretical” decoding positions that are stored as part of thekey replication data 184.

In block 2007 in FIG. 20 , the processor 112 decodes the key 2100 bydetermining a size of a cut in the edge 216 of the blade 214 of the key2100 at each of the examining positions in the optimum set of examiningpositions. As explained above, determining a size of a cut in the edge216 of the blade 214 might comprise determining the extent of the cut inthe width dimension. The extent of the cut in the width dimension mightbe determined from a (virtual) reference line that extends in the lengthdimension. The reference line might be aligned with the oppositelengthwise edge 215 of the key 2100, or a centre of the blade 214 in thewidth dimension, for instance.

The stored key replication data 184 might indicate valid sizes of cutsin the edge 216 of the blade 214. Each valid size of cut might be acorrespond with an extent of a cut in the width dimension. For example,there might be five different valid sizes of cut at a decoding position(e.g. a 1 mm, 2 mm, 3 mm, 4 mm or 5 mm cut). The processor 112 mightcompare the size of cut at each examining position in the optimum set ofexamining positions with each valid size of cuts.

For example, if the optimum examining positions are determined to beA10, B10, C10, D10 and E10, the size of the cut in the edge 216 of theblade 214 at each of those examining positions is compared with thevalid sizes of cut as defined in the key replication data 184. If thesize of the cut at any of the optimum examining positions does notcorrespond with one of the valid sizes of cut, the decoding process mayfail.

For instance, consider a situation where the valid sizes of cuts in theedge 216 of the blade 214 are 1 mm, 2 mm, 3 mm, 4 mm or 5 mm. If themeasured size of the cut at a particular optimum examining position(e.g. A10) is 1.5 mm, it is unclear whether that corresponds with a 1 mmcut or a 2 mm cut. Under the specification set out by the manufacturer(which is stored in the key replication data 184), a 1.5 mm cut is not avalid size of cut. Thus, in such circumstances, the processor 112 mightdetermine that the decoding process has failed.

The size of the cut at a particular optimum examining position (e.g.A10) might be considered not to correspond with a particular valid sizeof cut if the difference between the size of the cut and the particularvalid size of cut is greater than a threshold value. In some examples,the size of the cut at a particular optimum examining position (e.g.A10) might be considered not to correspond with a particular valid sizeof cut if it does not fall within a particular range of the valid sizeof cut.

The threshold(s) or the range could be any suitable value(s). Forexample, a size of cut at the optimum examining position in the edge 216of the blade 214 might be considered to correspond with a valid size ofcut if the size of the cut is between 35% greater and 45% shallower thanthe valid size of cut.

The processor 112 may decide whether or not to pass or fail the decodingprocess based on the comparisons. For example, in some examples, if theprocessor 112 determines that a cut in the edge 216 of the blade 214 atany one of the optimum examining positions (e.g. 010) does notcorrespond with one of the valid sizes of cuts, the processor 112 maydecide to fail the decoding process. If the processor 112 determinesthat each of the cuts at the optimum examining positions correspondswith a valid size of cut, the processor 112 may pass the decodingprocess.

If the processor 112 passes the decoding process, the processor 112 maydetermine the code that corresponds with the key 2100 and may decidethat a replication of the key should be cut in accordance with the code.

If the processor 112 fails the decoding process, the processor 112 maydecide instead that a replication of the key should be cut by tracerather than by code. The processor 112 may determine a trace of the edge216 of the blade 214, by processing the image of the blade 214 of thekey 2100, from which a replication of the key 2100 may be cut.

The blocks 2002-2007 or 2003-2007 may be repeated in respect of theother lengthwise edge 215 of a key if the key is a double-sided edge cutkey.

With reference to FIG. 23 , a flowchart illustrating an exemplary method2000 for decoding a scanned image of an edge-cut key blade (such as thekey blade 214 illustrated in FIG. 21 ) is provided. The method 2000illustrated in FIG. 23 includes some aspects of the method illustratedin FIG. 12 . The method described below in relation to FIG. 23 may beinclude any of the features of the method described above in relation toFIG. 12 , and vice-versa. The method 2000 begins by receiving an imageof a key blade of a master key to be copied, such as may be captured andproduced in block 1003 of the method illustrated in FIG. 12 . The imageis received in block 2020 in FIG. 23 .

In block 2040, the key scanning apparatus 100 may use a special purposecomputing module or computer code or computer software 116, stored in anon-transitory memory 114 and executed by a process, to simulate slidingvirtual lock pins over the cuts in the key blade as provided in theimage of the key blade. This process accommodates at least 40% of theaverage cut spacing for cuts or bittings in a key blade but mayaccommodate more or fewer cut spacings or bittings for certain key bladetypes. The process starts by sliding, in an incremental fashion, thevirtual pins a short distance before the centre of each key blade cut.The virtual pins are slid or moved through the centres of the key bladecuts and then the movement of the virtual pins is stopped after thevirtual pins have passed through the centres of the key blade cuts.

In block 2060, each cut in the key blade is analysed at each slidingincrement (called an “examining position” in the method described abovein relation to FIG. 12 ) as the virtual pins move from the originalposition at one side of the centre of the cuts on the key blade, throughthe centres, and to the other side of the centres. At each slidingincrement, each cut in the key blade is examined in turn. Each cut isprocessed in small steps or increments from exactly −0.5*flat width ofthe key 2100 to up to +0.5*flat width of the key 2100 from the centre ofthe virtual pin. In block 2080, it is measured for low long (distance orlength) each of the small steps remains horizontal. When theincrementing through the steps is complete for a single cut, in block2100 the maximum horizontal line length is stored and the process isrepeated in block 2120 for each cut or bit on the key blade. In someexamples each cut or bit on the key blade is examined simultaneously.

In block 2140, a value to store for each sliding increment isdetermined. This value may be deriving by determining a sum of themaximum value for each cut for a particular sliding increment. In block2160, the pins are slid incrementally and a new value is determined foreach incremental location for all of the cuts on the key blade. In block2180, an optimum or best position for decoding a set of features whichmay be a set of key cut depths or bitting information is determined.Here, a “key cut depth” is the extent of a cut in the dimension definedby the y-axis in FIG. 21 . The optimum position is where the sum of themaximum cut horizontal measurements is the greatest of all the measuredslide increments for the virtual pins as the pins are moved through thecentres of each cut on the key blade.

In block 2200, the key blade is decoded at the optimum position. Inblock 2220, both sides of the key blade are decoded using theinformation determined in blocks 2020-2180. Decoding fails on any oneside of the key blade if any measured depth falls outside of apredetermined range where +35% of an allowable cut depth is too high and−45% of an allowable cut depth is too deep. In block 2240, the cutdepths as measured for the key blade of the master key have the depthfor an OEM key subtracted from them to obtain a set of scores. A set ofscores where each score is “0” would be ideal and would indicate adirect match to an OEM key as determined by an OEM key code.

The OEM key code comprises a set of measurements for a key blade. TheOEM key code may be, for example, the key cut depths or bittinginformation for each cut position on one or both sides of a key blade.Determining whether to cut by code or by trace may be based in part onwhether or not an OEM key code can be identified for comparison to themaster key to be copied. Known OEM key codes are used to determine a setof maximum cut depth differences or specific cut depths for every cutposition on a key blade. There are a predetermined or set number of keycodes for any particular OEM key, and these codes may be used to cut,correct, or reject a decoded key for cutting.

A best fit line is then applied to the differences in the key cut orbitting depths for the key blade of the master key from a “perfect” linefor an OEM key as determined by an OEM key code. The best fit line isused to generate or determine a set of errors including the accuracy offit, skew angle, and shift bias. The set of errors are summed togetherto determine a final score for the decoded key.

In block 2300 the side of the key blade with the lowest error score asdetermined by comparing the final error scores for each side of the keyblade is identified. In block 2320, the side with the lowest error scoreis compared to a predetermined pass/fail value. Decoding of the keyfails if both sides of the key blade have at least cut being determinedto be too deep or too high or if neither of the sides of the key have anerror less than the predetermined pass/fail value. In block 2340, a copykey or replacement key is cut based on either the decoded key value ifone side of the master key as decoded has a final score or error valueunder the predetermined pass/fail value, or on a trace of the master keyif neither side of the master key as decoded has a final score or errorvalue under the predetermined pass/fail value.

The blocks illustrated in FIGS. 11, 12, 13, 18, 20 and 23 may representsteps in a method and/or sections of code in the computer program 116.The illustration of a particular order to the blocks does notnecessarily imply that there is a required or preferred order for theblocks and the order and arrangement of the block may be varied.Furthermore, it may be possible for some steps to be omitted.

References to ‘control circuitry’, ‘computer’, ‘processor’, etc. shouldbe understood to encompass not only computers having differentarchitectures such as single/multi-processor architectures andsequential (Von Neumann)/parallel architectures but also specializedcircuits such as field-programmable gate arrays (FPGA), applicationspecific circuits (ASIC), signal processing devices and other processingcircuitry. References to computer program, instructions, code etc.should be understood to encompass software for a programmable processoror firmware such as, for example, the programmable content of a hardwaredevice whether instructions for a processor, or configuration settingsfor a fixed-function device, gate array or programmable logic deviceetc.

Although embodiments of the present invention have been described in thepreceding paragraphs with reference to various examples, it should beappreciated that modifications to the examples given can be made withoutdeparting from the scope of the invention as claimed. For example, thekey height data 181, the key blank outline data 182, the key blank bladedata 183 and the key replication data 184 are shown as being stored in alocal memory 114 in FIG. 2 . In other examples, one, some or all of thekey height data 181, the key blank outline data 182, the key blank bladedata 183 and the key replication data 184 might alternatively be storedin a remote location such as a remote/cloud server.

The support 50 might not necessarily be a platform. It might, forexample, be a key clamp.

The apparatus 100 may comprise a transmitter that is under the controlof the processor 112. Once data has been determined that defines how tocut a key in order to replicate the key (by performing one or more ofthe methods described above), that data may be transmitted to a remotelocation in order for the key to be replicated from an appropriate keyblank that is also specified in the data. The data may be transmittedover or more networks. The one or more network may include the internet.

Alternatively, the apparatus 100 may comprise cutting apparatus to cut akey blank in accordance with the data and thereby replicate the key.

While the key scanning apparatus 100 is described above as potentiallybeing of a size that is suitable for desktop or tabletop use, that mightnot necessarily be the case in all examples. For example, it could be alarger apparatus that suitable for positioning on a floor and is tallenough for a person to use comfortably when standing. The key scanningapparatus 100 might, in some embodiments, be a semi-automated or fullyautomated key vending machine.

The light source 38 might not be a laser in some examples. It might, forexample, be or comprise a light emitting diode or an incandescent lightsource that is arranged to direct a line of light onto the platform 50(e.g. through a slit).

In some examples, the processor 112 might perform image processing todetect details of the head of a key, such as one or more buttons, textand/or colours.

Features described in the preceding description may be used incombinations other than the combinations explicitly described.

Although functions have been described with reference to certainfeatures, those functions may be performable by other features whetherdescribed or not.

Although features have been described with reference to certainembodiments, those features may also be present in other embodimentswhether described or not.

Whilst endeavouring in the foregoing specification to draw attention tothose features of the invention believed to be of particular importanceit should be understood that the applicant claims protection in respectof any patentable feature or combination of features hereinbeforereferred to and/or shown in the drawings whether or not particularemphasis has been placed thereon.

I/We claim: 1.-25. (canceled)
 26. A key scanning apparatus, comprising: at least one light source arranged to direct a beam of light towards a blade of a key; a camera arranged to capture at least a portion of the beam of light reflected by the blade of the key; memory storing at least one computer program comprising computer program instructions; and at least one processor that, when executing the computer program instructions, is configured to: determine, at least in part from stored key replication data, a plurality of decoding positions at which the blade of the key is to be scanned in order to decode the key; adjust a position of the light source in order to cause the light source to direct the beam of light towards the blade of the key at each of the plurality of decoding positions, wherein, for each decoding position, the position of the light source is adjusted to direct the beam of light towards the blade of the key at one or more positions that are offset from the decoding position; obtain at least one image, from the camera, of at least a portion of the beam of light reflected from the blade of the key at each of the plurality of decoding positions, and obtain, for each decoding position, at least one image, from the camera, of the blade of the key at the one or more offset positions based on at least a portion of the beam of light reflected by the blade of the key; and determine, for each decoding position, one or more properties of a shape of the blade of the key by analysing the images of the beam of light at the decoding positions and the one or more offset positions for each decoding position, in order to decode the key.
 27. The key scanning apparatus of claim 26, wherein the blade of the key has a length in a length dimension, a width in a width dimension and a depth in a depth dimension, the length being greater than the width and the width being greater than the depth, and each of the plurality of positions is a position along the length dimension of the blade of the key.
 28. The key scanning apparatus of claim 27, wherein the images obtained at each decoding position and the one or more offset positions for each decoding position depicts a shape of the blade of the key in a plane defined by the width dimension and the depth dimension.
 29. The key scanning apparatus of claim 27, wherein the one or more properties include a position, in the width dimension, of a cut into the blade of the key.
 30. The key scanning apparatus of claim 29, wherein the position, in the width dimension, of the cut into the blade of the key is specified from an edge of the blade of the key.
 31. The key scanning apparatus of claim 27, wherein the one or more properties include a depth of cut into the blade of the key in the depth dimension.
 32. The key scanning apparatus of claim 27, wherein the one or more properties include a width of cut into the blade of the key in the depth dimension.
 33. The key scanning apparatus of claim 27, wherein the at least one processor, when executing the computer program instructions, is configured to: capture at least one image depicting an outline of at least the blade of the key in the length and width dimensions; and determine, from the at least one image, a location of a tip of the blade of the key, wherein the plurality of decoding positions at which the blade of the key is to be scanned in order to replicate the key is determined, at least in part, from the determined location of the tip of the blade of the key.
 34. The key scanning apparatus of claim 26, wherein the beam of light is shaped to define a line across the blade of the key.
 35. (canceled)
 36. The key scanning apparatus of claim 26, when dependent upon wherein the one or more positions that are offset from the decoding position are offset from the decoding position in the length dimension. 37.-49. (canceled)
 50. An apparatus, comprising: memory storing at least one computer program comprising computer program instructions; and at least one processor that, when executing the computer program instructions, is configured to: cause a camera to capture at least one image depicting an outline of a key having a length in a length dimension and a width in a width dimension, the key comprising a head and a blade; identify the blade in the at least one image; process the at least one image to simulate reconstruction of at least one edge of the blade of the key along the length dimension and thereby form a reconstructed key; determine a travel distance, for the reconstructed key in the length dimension, into each of a plurality of two-dimensional areas by comparing a width of the reconstructed key with a width of a two-dimensional area at multiple positions along a length of the reconstructed key from a tip of the reconstructed blade, wherein the travel distance corresponds with a distance from the tip of the reconstructed blade to a position along the length dimension at which the width of the reconstructed key becomes greater than the width of the two-dimensional area, and wherein each two-dimensional area corresponds with a blade of a key blank; determine, for each two-dimensional area, a width of the reconstructed key at a position along the length dimension that corresponds, at least approximately, with the travel distance; determine, for each two-dimensional area, whether the travel distance of the reconstructed key in the length dimension matches, at least approximately, the length of the two-dimensional area and determine, for each two-dimensional area, whether the determined width of the reconstructed key, at a position along the length of the reconstructed key based on the travel distance, at least approximately matches the width of the two-dimensional area; and identify one or more key blanks associated with one or more of the two-dimensional areas that have a length that matches, at least approximately, the travel distance and a width that matches, at least approximately, the width of the reconstructed key at a position along the length dimension that corresponds, at least approximately, with the travel distance.
 51. The apparatus of claim 50, wherein the at least one processor is configured, when executing the computer program instructions, to: control at least one light source to direct a beam of light to a position on the blade in the length dimension that corresponds, at least approximately, with the travel distance.
 52. The apparatus of claim 51, wherein the at least one processor is configured, when executing the computer program instructions, to: cause a camera to capture at least one image of a reflection, from the blade of the key, of at least a portion of the beam of light.
 53. The apparatus of claim 52, wherein the at least one processor is configured, when executing the computer program instructions, to: compare the at least one image of the reflection with a two-dimensional profile of each of the one or more identified key blanks.
 54. The apparatus of claim 53, wherein the wherein the at least one processor is configured, when executing the computer program instructions, to: control the light source to move into a plurality of different positions in order to direct the beam of light to a plurality of different positions on the blade in the length dimension, each of which corresponds, at least approximately, with the travel distance; and cause the camera to capture at least one image of a reflection, from the blade of the key, of at least a portion of the beam of light in respect of each of the plurality of different positions of the light source.
 55. The apparatus of claim 54, wherein the plurality of images is combined using image averaging to form a combined image, and the combined image is compared with a two-dimensional profile of each of the one or more identified key blanks. 56.-63. (canceled)
 64. An apparatus, comprising: memory storing at least one computer program comprising computer program instructions; and at least one processor that, when executing the computer program instructions, is configured to: cause at least one image of a key to be captured, the image depicting a blade of the key that includes cuts in an edge of the blade, wherein the blade in the at least one image has a length in a length dimension and a width in a width dimension; determine, at least in part from stored key replication data, a plurality of decoding positions for the cuts in the blade; determine a plurality of examining positions, for each decoding position, at which to examine each of the cuts in the edge of the blade depicted in the image, wherein each examining position in a plurality of examining positions for a decoding position has a corresponding examining position in each of the other plurality of examining positions for the other decoding positions, each corresponding examining position being the same distance from its decoding position, wherein corresponding examining positions form a set of examining positions; for each set of examining positions, examine the cuts in the edge of the blade by determining, for each corresponding examining position in a set of examining positions, how long the edge of the blade remains substantially parallel to the length dimension; determine at least one value to store, for each set of examining positions, corresponding with how long the edge of the blade remains substantially parallel to the length dimension; determine, from the stored values, an optimum set of examining positions at which to determine, from the at least one image, a size of each cut in the blade of the key; and decode the key at least in part by determining a size of a cut in the blade of the key at each of the examining positions in the optimum set of examining positions.
 65. The apparatus of claim 64, wherein the at least one processor, when executing the computer program instructions, is configured to: determine, from the stored key replication data, valid sizes of cut; and compare a size of cut at each examining position in the optimum set of examining positions with the valid sizes of cuts.
 66. The apparatus of claim 65, wherein the at least one processor, when executing the computer program instructions, is configured to: decide whether to cut a replication of the key by code or by trace based, at least in part on the comparisons.
 67. The apparatus of claim 66, wherein the at least one processor, when executing the computer program instructions, is configured to: determine a trace by which to cut the key from the at least one image captured of the key.
 68. The apparatus of claim 65, 66 or 67, wherein comparing a size of a size of cut at each examining position in the optimum set of examining positions with valid sizes of cuts comprises determining a difference between a size of cut at an examining position in the optimum set of examining positions and a valid size of cut.
 69. The apparatus of claim 68, wherein the at least one processor, when executing the computer program instructions, is configured to: determine that a cut in the edge of the blade at an examining position in the set of optimum examining positions does not correspond with a valid size of cut, if the difference between the cut in the edge of the blade at the examining position in the set of optimum examining positions and the valid size of the cut does not fall within a particular range.
 70. The apparatus of claim 69, wherein the at least one processor, when executing the computer program instructions, is configured to: decide to cut a replication of the key by trace if the cut in the edge of the blade at the examining position in the set of optimum examining positions does not correspond with any of the expected sizes of the cuts at the decoding position. 71.-79. (canceled) 